Clean Architecture starter project for ASP.NET Core. Clean Architecture is the latest in a series of architectures aiming towards a loosely-coupled, dependency-inverted architecture. You may also hear it referred to as Hexagonal, ports-and-adapters, or onion architecture.
If you are using or like this project, you can support it by giving a star. Thank you!
The project currently uses .NET version 8. There is no support for older versions.
This project has been published as a template via a NuGet package. After installing, it will appear in your project list in the "Create New Project" section of VS2022.
To install, you can visit NuGet (https://www.nuget.org/packages/TS.CleanArchitecture)
Or you can install it by running the following code block:
dotnet new install TS.CleanArchitecture
After the installation is complete, you can view the VS2022 project list with dotnet new list
and search for the project template "ASP.NET Clean Architecture Solution" with the short name "ts.cleanarchitecture". If you find it in the list, you can now create a new project via VS2022 and find it by searching for "Clean Architecture" in the project search bar.
After selecting the project, give it any name you want, for example eCommerce
- EntityFrameworkCore
- EntityFrameworkCore.Identity
- MediatR
- AutoMapper
- FluentValidation
- TS.Result
- TS.EntityFrameworkCore.GenericRepository
The project is initially configured with MSSQL. If you want to continue with MSSQL, adjust the ConnectionStrings section in the appsetting.json
file according to your settings.
If you want to change the database, you need to change the installed NuGet package in the Infrastructure layer and modify the connection information.
The Login
method and User
class are present in the project. When the project runs, it automatically creates an admin user.