I'm meant to call this method at startup but it's not reference anywhere:
dbContext.Database.Migrate();
Type
DatabaseFacadedoes not contain a definition forMigrateand no extension methodMigrateof typeDatabaseFacadecould 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