I'd like to call these migrations from a script and while there's plenty of information on how to do that with Entity Framework standard there's very little with Entity Framework Core.
I believe that this is the command that I need but I'm not sure on how to instantiate it properly or where the underlying classes are.
https://github.com/aspnet/EntityFrameworkCore/blob/7c64310a66ad04d04c43edaa70dc9e3963cb493f/src/ef/Commands/DatabaseUpdateCommand.Configure.cs
Edit: There seems to be some confusion about what it is I'm trying to do. Here is an example in the standard Entity Framework. However, upon first look there doesn't seem to be equivilent to DbMigrator
in entity framework core.
https://romiller.com/2012/02/09/running-scripting-migrations-from-code/
We made it easier in EF Core:
using (var db = new MyDbContext())
{
db.Database.Migrate();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With