====== ASP.NET CORE EntityFramework Scaffold Database-Model ====== https://www.entityframeworktutorial.net/efcore/create-model-for-existing-database-in-ef-core.aspx > DotNet CLI > If you use dotnet command line interface to execute EF Core commands then open command prompt and navigate to the root folder and execute the following dotnet ef dbcontext scaffold command: dotnet ef dbcontext scaffold "Server=.\SQLEXPRESS;Database=SchoolDB;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o Models > Thus, you can create EF Core model for an existing database. > Note: Once you have created the model, you must use the Migration commands whenever you change the model to keep the database up to date with the model. {{tag>[ASP.NET_CORE ASP.NET SQL scaffold EntityFrameworkCore EF_Core EF Model]}}