Skip to content
Zack Schwartz edited this page Mar 28, 2023 · 2 revisions

Helpful EntityFramework Migration Commands

dotnet ef migrations add [migration_name] --project .\src\Raytha.Infrastructure\ --startup-project .\src\Raytha.Web --configuration "Debug without JS"
dotnet ef database update --project .\src\Raytha.Infrastructure\ --startup-project .\src\Raytha.Web --configuration "Debug without JS"
dotnet ef database drop --project .\src\Raytha.Infrastructure\ --startup-project .\src\Raytha.Web --configuration "Debug without JS"

dotnet ef migrations script 0 --project .\src\Raytha.Infrastructure --startup-project .\src\Raytha.Web -o InitialCreate.sql
dotnet ef migrations script [from] --project .\src\Raytha.Infrastructure --startup-project .\src\Raytha.Web -o Latest.sql

Build and Run from VS Code

//build javascript front end too, though takes longer compilation time
dotnet run --project .\src\Raytha.Web --configuration "Debug"

//save build time if you already built js front end
dotnet run --project .\src\Raytha.Web --configuration "Debug without JS"

//release mode
dotnet run --project .\src\Raytha.Web --configuration "Release"

Docker commands

//build docker image from parent directory
docker build -t raytha .
Clone this wiki locally