Run EF Migrations in Azure SQL Database
I made an Azure SQL Database for my blazor application. I'm wondering how to run my EF Migrations so my SQL DB gets seeded with the proper data?
9 Replies
either using the ef tools or
dbContext.Database.Migrate/MigrateAsync
in your programWhen I use ef tools in VS locally, it only applies my migrations to my local db. How do I target the app on azure?
EF Core tools reference (.NET CLI) - EF Core
Reference guide for the Entity Framework Core .NET Core CLI tools
So I do what the docs say, but it just says "Build succeeded" then stalls. And the build hasn't actually succedded, when I check the db it has none of the tables from the migration
the build isn't what does the migration, the migration is run after your program is built
if it just sits there i imagine there's a connection issue
Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user 'coldevelopment'.
Yep, took forever, but just got that error
I'm 100% my userid and password was right though
well, the server you're connecting to says otherwise
💀💀