I am building a project template using .net core 3.0 and Microsoft.EntityFrameworkCore. this will just created the database schema not the data table
if (!context.Database.EnsureCreated())
context.Database.Migrate();
Do we have an automatic migration that helps to create/update datatable without needing to manually call Add-Migration Update database
I was able to build it automatically in .net using Code base EF6, it will just detect if you have created a new field in the model and add it to database automatically.
Do we have something in .net Core ? Thanks
Do we have an automatic migration that helps to create/update datatable without needing to manually call Add-Migration Update database
As far as I know, automatic migration feature has been removed in EF Core.
And DbContext.Database.Migrate();
just help apply any pending migrations for the context to the database, which mean that we should created migration(s) first otherwise it would not work.