Skip to content

cihataydin/solution-template

Repository files navigation

solution-template

A template for building .NET microservices with best practices and common patterns.

Contents

Initialize Application

Follow these steps to initialize the application on your local machine.

On macOS/Linux

First, make sure the init.sh script has executable permissions

chmod +x init.sh

Then build the application using

./init.sh build

Start the application with

./init.sh start

Alternatively, run the application in watch mode

./init.sh watch

On Windows

From PowerShell or Command Prompt run build command

.\init.cmd build

Start the application

.\init.cmd start

Alternatively run the application in watch mode

.\init.cmd watch

On Docker

Use the following command to start the application in Docker container.

docker-compose --env-file .env.docker up --build -d

API Interfaces

Swagger UI

Scalar UI

Monitoring Tools

Enable real‑time metrics, logs, and health checks for the application by following the step‑by‑step setup guide. Click for Guide

Migration

  1. Install the EF Core CLI tool (dotnet-ef)
    dotnet tool install --global dotnet-ef
    

This command adds the EF Core command-line tools to your system globally.

  1. Verify the installation
    dotnet ef --version

If you see a version number, the tool has been installed successfully.

  1. Create a new migration
    dotnet ef migrations add InitialMigration --context DataContext --project src/Infra
  • --context DataContext: Specifies which DbContext to use when generating the migration.
  • --project src/Infra: Specifies the project folder where the migration files will be created.
  1. Apply the migration to the database
    dotnet ef database update --context DataContext --project src/Infra

This command applies the latest migration to the database.

Deployment

Service may be in sleep mode on the first request. You may need to wait for a few seconds. Live Demo Url

Technologies and References

License

solution-template is licensed under the MIT license.

About

A template for building .NET microservices with best practices and common patterns.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors