A minimal backend API template using .Net8.0
anf EF Core
to get one started up and running quickly.
Create migrations.
dotnet ef migrations add InitialCreate
Update it to the database or create database, once for each environment.
dotnet ef database update -- --environment Development
Update appsettings.json for Production
, appsettings.Development.json for Development
and appsettings.Staging.json for Staging
respectively. The ASPNETCORE_ENVIRONMENT
is set to the respective environment.
dotnet run --launch-profile https --environment Development
dotnet run --launch-profile https --environment Production
Navigate to swagger to access the API's. Use correct port if different.
Read MS EF Core for more.