๐‚๐จ๐ง๐Ÿ๐ข๐๐ž๐ง๐ญ๐ฅ๐ฒ ๐๐ฎ๐ข๐ฅ๐ ๐๐ซ๐จ๐๐ฎ๐œ๐ญ๐ข๐จ๐ง-๐‘๐ž๐š๐๐ฒ ๐‚๐‘๐”๐ƒ ๐ฐ๐ข๐ญ๐ก ๐„๐… ๐‚๐จ๐ซ๐ž ๐ข๐ง ๐‚๐ฅ๐ž๐š๐ง ๐€๐ซ๐œ๐ก๐ข๐ญ๐ž๐œ๐ญ๐ฎ๐ซ๐ž

๐‚๐จ๐ง๐Ÿ๐ข๐๐ž๐ง๐ญ๐ฅ๐ฒ ๐๐ฎ๐ข๐ฅ๐ ๐๐ซ๐จ๐๐ฎ๐œ๐ญ๐ข๐จ๐ง-๐‘๐ž๐š๐๐ฒ ๐‚๐‘๐”๐ƒ ๐ฐ๐ข๐ญ๐ก ๐„๐… ๐‚๐จ๐ซ๐ž ๐ข๐ง ๐‚๐ฅ๐ž๐š๐ง ๐€๐ซ๐œ๐ก๐ข๐ญ๐ž๐œ๐ญ๐ฎ๐ซ๐ž

ยท

2 min read

Several developers have requested to see my Clean Architecture CRUD project quickly. I am as excited as you are. It's already in the market. The rest of the two Raw ADO.NET AND SP applications will be out soon!

I believe the project is suitable for beginners to advanced levels who want to develop an ASP.NET Core Web API project with Clean architecture.

The controllers are very thin, resulting in a neat and clean appearance. API versioning with CORS is implemented. Balancing Cross-Cutting Concerns in the project has been achieved. The Global Error Handling middleware has been implemented nicely.

The MediatR with CQRS has been implemented in a very clean way. Logging Source Generator for High-Performance Logging and Structured Logging in ASP.NET Core With Serilog has been implemented. In the API layer, caching has been introduced. You can use Ardalis Guard Clauses or ErrorOr, but in these projects, I implement custom guard clauses that are fully customizable. Dependency injection is utilized throughout. Health checks are integrated so we can check the health condition of the project. Here, we have EF Core code-first migration.

We have robust Architecture tests using NetArchTest for the full N-Layer architecture and unit tests using xUnit. Fluent Assertion and NSubstitute are used in the test. Unit tests cover more than 90% test coverage in their application layers. You can learn how to write architecture and unit tests effectively by examining the project. I have written over 60 unit tests, which may seem extensive, but it's because of the approach I take, which makes learning and understanding easy.

With the introduction of MsBuild, we now have the capability to manage all property settings and more within a single file, which can be placed in the root directory of our solution alongside our solution file. This file (Directory.Build.props) will automatically apply to all projects defined in the solution.

Dependency management is a fundamental aspect of NuGet. While managing dependencies for a single project may be straightforward, it becomes increasingly challenging as multi-project solutions grow in size and complexity. In scenarios where common dependencies are shared across numerous projects, leveraging NuGet's centralized package management features allows for streamlined management from a single location. I achieve this through a centralized NuGet package system using Directory.Packages.props.

Here is the link to see more details about the project: https://saddamhossain.net/essentials-collection/clean-crud-ef-core-details

Happy Coding!

ย