C
C#•10mo ago
Gecko

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
Jimmacle
Jimmacle•10mo ago
either using the ef tools or dbContext.Database.Migrate/MigrateAsync in your program
Gecko
GeckoOP•10mo ago
When I use ef tools in VS locally, it only applies my migrations to my local db. How do I target the app on azure?
Jimmacle
Jimmacle•10mo ago
EF Core tools reference (.NET CLI) - EF Core
Reference guide for the Entity Framework Core .NET Core CLI tools
Gecko
GeckoOP•10mo ago
No description
Gecko
GeckoOP•10mo ago
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
Jimmacle
Jimmacle•10mo ago
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
Gecko
GeckoOP•10mo ago
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
Jimmacle
Jimmacle•10mo ago
well, the server you're connecting to says otherwise
Gecko
GeckoOP•10mo ago
💀💀
Want results from more Discord servers?
Add your server