Clean structured ASP.NET Core web project, follows the Clean Architecture principles, SOLID design principles, and implements the Dependency Injection, Repository, and Unit of Work design pattern, and utilizes Entity Framework Core for data access.
This template is for a clean structured ASP.NET Core web project, follows the Clean Architecture principles, SOLID design principles, implements the Dependency Injection, Repository, and Unit of Work design pattern, and utilizes Entity Framework Core for data access. It provides a standardized structure and organization for building robust and maintainable ASP.NET Core web applications with complete CRUD (Create, Read, Update, Delete) operations. Feel free to ask any questions or share your thoughts.
You can visit my blog post- Clean Structured Project – ASP.NET Core
The project structure is designed to promote separation of concerns and modularity, making it easier to understand, test, and maintain the application.
├── src
│ ├── Core # Contains the core business logic, domain models, view models, etc.
│ ├── Infrastructure # Contains infrastructure concerns such as data access, external services, etc.
│ └── UI # Contains the user interface layer, including controllers, views, extensions, etc.
├── tests
│ ├── Core.Tests # Contains unit tests for the core layer
│ ├── Infrastructure.Tests # Contains unit tests for the infrastructure layer
│ └── UI.Tests # Contains unit tests for the UI layer
└── README.md # Project documentation (you are here!)
To use this project template, follow the steps below:
appsettings.json
file of the Infrastructure project.Project.Infrastructure
project, and run the Update-Database
command to create the databaseProject.UI
project.This project template includes the following features:
The project template provides a starting point for implementing CRUD operations on entities using Entity Framework Core. You can modify and extend the existing code to suit your specific application requirements. Here's an overview of the key components involved in the CRUD operations:
Core
project contains the domain models representing the entities you want to perform CRUD operations on. Update the models or add new ones according to your domain.Infrastructure
project contains repository implementations that handle data access operations using Entity Framework Core. Modify the repositories or create new ones to match your entity models and database structure.Core
project contains services that encapsulate the business logic and orchestrate the operations on repositories. Update or create new services to handle CRUD operations on your entities.UI
project contains controllers that handle HTTP requests and responses. Update or create new controllers to expose the CRUD endpoints for your entities.Make sure to update the routes, validation, and error-handling logic to align with your application requirements and best practices.
If you have any questions or need further assistance, please contact the project author at @kawser2133 ||
I want you to know that contributions to this project are welcome. Please open an issue or submit a pull request if you have any ideas, bug fixes, or improvements.
This project is licensed under the MIT License.