C
C#3y ago
barcode

Deploying ASP.NET on remote machine

Hello, I've ran dotnet publish and got the files to put on my machine, however I'm not sure what is the correct way to run migrations on the remote machine, if someone can point me in the right direction
3 Replies
barcode
barcodeOP3y ago
I'm using EF Core
Cisien
Cisien3y ago
you can generate an ef core deployment package which can apply the migrations. You can also generate sql scripts that can apply your migration, then run those with whatever db management software you normally use. Alternatively, you can have the application apply the migrations on startup by calling ctx.Database.Migrate() (or something like that)
barcode
barcodeOP3y ago
thank you

Did you find this page helpful?