I'm meant to call this method at startup but it's not reference anywhere:
dbContext.Database.Migrate();
Type
DatabaseFacade
does not contain a definition forMigrate
and no extension methodMigrate
of typeDatabaseFacade
could be found (are you missing a using directive or an assembly reference?
So which using / assembly am I missing?
Adding Microsoft.EntityFrameworkCore.SqlServer
via NuGet fixed the issue for me.
Just import EntityFrameworkCore
by typing the following at the top:
using Microsoft.EntityFrameworkCore;
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