Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.5 KB

README.md

File metadata and controls

39 lines (23 loc) · 1.5 KB

CleanArchitecture.WebApi

Getting Started

  1. Install the latest .NET 5 SDK

Database Configuration

The template is configured to use an in-memory database by default. This ensures that all users will be able to run the solution without needing to set up additional infrastructure (e.g. SQL Server).

If you would like to use SQL Server, you will need to update WebUI/appsettings.json as follows:

  "UseInMemoryDatabase": false,

Verify that the DefaultConnection connection string within appsettings.json points to a valid SQL Server instance.

When you run the application the database will be automatically created (if necessary) and the latest migrations will be applied.

Database Migrations

To use dotnet-ef for your migrations please add the following flags to your command (values assume you are executing from repository root)

  • --project src/Infrastructure (optional if in this folder)
  • --startup-project src/WebUI
  • --output-dir Persistence/Migrations

you can also launch the app from Visual Studio. It launch the app and API.