百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

CleanArchitecture

> 编程语言
开源

此仓库包含了在 ASP.NET Core 中实现域驱动设计和清晰的架构。

391 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

此仓库包含了在 ASP.NET Core 中实现域驱动设计和清晰的架构。

‍♂️ How to Run the Project

  1. First make sure that you have .NET 7.0 and Visual Studio 2022 are installed.
  2. Now open the solution with VS 2022 and build the solution to make sure that there is no error.
  3. Now make CleanHr.Api and ClearHr.Blazor projects as startup projects and then run it. On startup necessary databases will be created in MSSQLLocalDB
  4. (Optional) To enable distributed tracing with Grafana Tempo, run: docker compose -f src/ServerApp/Presentation/CleanHr.Api/docker-compose.yml up -d
    • Access Grafana at: http://localhost:3000
    • Traces will be automatically sent to Tempo and visualized in Grafana
    • See src/ServerApp/Presentation/CleanHr.Api/Observability/OBSERVABILITY.md for detailed documentation

Clean Architecture in ASP.NET Core

This repository contains the implementation of Domain Driven Design and Clear Architecture in ASP.NET Core.

⚙️ Fetures

  1. Domain Driven Design
  2. CQRS
  3. REST API
  4. API Versioning
  5. Blazor Client (Web Assembly)
  6. Caching with InMemory and Redis
  7. Distributed Tracing with OpenTelemetry and Grafana Tempo
  8. EF Core Repository and Cache Repository
  9. Microsoft SQL Server
  10. Simple and clean admin template for starter

Folder Structures:

src/ServerApp:

Will contain all the projects of the server side app and will look like as follows:

src/ServerApp/Core:

Core folder contains the projects related to the application's core funcationalities like Domain Logic and Application Logic. This folder is called the heart of the server app.

EmployeeManagement.Domain Project:

This is application's Domain Layer which will contain:

  1. Domain entities and aggregate roots which will be mapped to database table
  2. Domain logic,
  3. Domain repositories
  4. Value objects.
  5. Domain Exceptions

This will not depend on any other project. This is fully independent.

EmployeeManagement.Application Project:

This is application's Application Layer which will contain:

  1. Appplication Logic
  2. Infrastructure repositories' interfaces i.e Cache Repository interfaces.
  3. Infrastructure services' interfaces i.e IEmailSender, ISmsSender, IApplicationLogger etc.
  4. Data Transfer Objects (Dtos)
  5. Command and Queries

It will only depend on Domain project aka Domain Layer.

src/ServerApp/Infrastructure:

This folder will contains all the project related to project's infrastuctures like Data access code, persistance and application's cross cutting concerns' intefaces implementation like IEmailSender, ISmsSender etc.

src/ServerApp/Presentation:

This folder will contain the REST API projects which is the PresentationLayer of the project.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言