I have a client whose SQL database is decades old. Software engineers do not have access to update schema objects and DBAs do not use code-first to update the database.
.NET Core 6 is a requirement for me. Since .edmx
is not a part of .NET Core, does anyone have recommendations for an ORM that implements a "database-first" approach?
CodePudding user response:
You can reverse engineer an existing database schema, which is a "database-first" workflow.
CodePudding user response:
Thanks ErikEJ.
EntityFramework tools allows me to keep the db models updated without having to deal with migrations.
scaffold-dbcontext "Data Source=.\sqlexpress;Initial Catalog=[DatabaseName];Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer -ContextDir [ContextDir] -OutputDir [ModelDir] -Namespace [ModelDir] -Context PortalDbContext -Force -NoOnConfiguring
More info on scaffold-dbcontext