/AspEfCore

Bolier plate for ASP .Net8.0 and EFCore

Primary LanguageC#MIT LicenseMIT

ASP .Net back end API

A minimal backend API template using .Net8.0 anf EF Core to get one started up and running quickly.

Create and apply migrations

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

Running in different environments

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

Swagger or API's

Navigate to swagger to access the API's. Use correct port if different.

Reference

Read MS EF Core for more.