Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c08a58c

Browse files
Merge pull request #2 from kawser2133/development
Update files
2 parents 7d8abbd + e47bfe7 commit c08a58c

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

‎README.md‎

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Clean Structured Project - ASP.NET Core
1+
# Clean Structured API Project - ASP.NET Core
22

3-
This template is for a 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. 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.
3+
This template is for a clean structured ASP.NET Core API project, following the Clean Architecture principles, SOLID design principles, implementing the Dependency Injection, Repository, and Unit of Work design pattern, and utilizing Entity Framework Core for data access. It provides a standardized structure and organization for building robust and maintainable ASP.NET Core API applications with complete CRUD (Create, Read, Update, Delete) operations.
44

55
## Project Structure
66

@@ -10,14 +10,30 @@ The project structure is designed to promote separation of concerns and modulari
1010
├── src
1111
│ ├── Core # Contains the core business logic and domain models, etc.
1212
│ ├── Infrastructure # Contains infrastructure concerns such as data access, external services, etc.
13-
│ └── UI # Contains the user interface layer, including controllers, views, and extensions, etc.
13+
│ └── API # Contains the API layer, including controllers, models, and extensions, etc.
1414
├── tests
1515
│ ├── Core.Tests # Contains unit tests for the core layer
1616
│ ├── Infrastructure.Tests # Contains unit tests for the infrastructure layer
17-
│ └── UI.Tests # Contains unit tests for the UI layer
17+
│ └── API.Tests # Contains unit tests for the API layer
1818
└── README.md # Project documentation (you are here!)
1919
```
2020

21+
## REST API
22+
23+
The API project contains the controllers responsible for handling HTTP requests and responses, adhering to RESTful principles. Here's an overview of the key components involved in building RESTful APIs using ASP.NET Core:
24+
25+
1. **Controllers**: The `API` project contains controllers that handle HTTP requests and responses. Each controller is responsible for a specific resource or entity. Controllers define HTTP methods (GET, POST, PUT, DELETE) that map to specific actions for CRUD operations on entities.
26+
27+
2. **Models/DTOs**: The `Core` project may contain Data Transfer Objects (DTOs) that represent the data to be sent over the API. DTOs help in decoupling the client's data format from the server's data format.
28+
29+
3. **Routing**: The routing mechanism in ASP.NET Core maps incoming HTTP requests to the appropriate controller and action method based on the URL. RESTful APIs typically use a resource-based URL pattern.
30+
31+
4. **HTTP Methods**: RESTful APIs use standard HTTP methods (GET, POST, PUT, DELETE) to perform CRUD operations on resources. Each HTTP method corresponds to a specific action on the API.
32+
33+
5. **Status Codes**: RESTful APIs use standard HTTP status codes to indicate the success or failure of an API request. For example, 200 (OK) for successful GET requests, 201 (Created) for successful POST requests, 204 (No Content) for successful DELETE requests, etc.
34+
35+
6. **Validation**: RESTful APIs should include proper validation logic to ensure that incoming data is valid and adheres to the expected format.
36+
2137
## Getting Started
2238

2339
To use this project template, follow the steps below:
@@ -27,42 +43,45 @@ To use this project template, follow the steps below:
2743
3. Open the solution in your preferred IDE (e.g., Visual Studio, Visual Studio Code).
2844
4. Build the solution to restore NuGet packages and compile the code.
2945
5. Configure the necessary database connection settings in the `appsettings.json` file of the Infrastructure project.
30-
6. Open the Package Manager Console, select `Project.Infrastructure` project and run the `Update-Database` command to create the database
31-
7. Run the application by starting the `Project.UI` project.
46+
6. Open the Package Manager Console, select `Project.Infrastructure` project, and run the `Update-Database` command to create the database.
47+
7. Run the application by starting the `Project.API` project.
3248

3349
## Project Features
3450

3551
This project template includes the following features:
3652

3753
- **Clean Architecture**: The project is structured according to the principles of Clean Architecture, which promotes separation of concerns and a clear division of responsibilities.
3854
- **SOLID Design Principles**: The code adheres to SOLID principles (Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion), making it easier to maintain and extend.
39-
- **Repository Pattern**: The repository pattern is used to abstract the data access layer and provide a consistent interface for working with data.
55+
- **Repository Pattern**: The repository pattern abstracts the data access layer and provides a consistent interface for working with data.
4056
- **Unit of Work Pattern**: The unit of work pattern helps manage transactions and ensures consistency when working with multiple repositories.
4157
- **Entity Framework Core**: The project utilizes Entity Framework Core as the ORM (Object-Relational Mapping) tool for data access.
42-
- **ASP.NET Core Web**: The project includes an ASP.NET Core web project that serves as the user interface layer, handling HTTP requests and responses.
58+
- **ASP.NET Core API**: The project includes an ASP.NET Core API project that serves as the API layer, handling HTTP requests and responses.
4359
- **CRUD Operations**: The project template provides a foundation for implementing complete CRUD (Create, Read, Update, Delete) operations on entities using Entity Framework Core.
4460
- **Dependency Injection**: The project utilizes the built-in dependency injection container in ASP.NET Core, making it easy to manage and inject dependencies throughout the application.
45-
- **Unit Testing**: The solution includes separate test projects for unit testing the core, infrastructure, and UI layers.
61+
- **Unit Testing**: The solution includes separate test projects for unit testing the core, infrastructure, and API layers.
4662

4763
## Usage
4864

49-
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:
65+
The project template provides a starting point for building RESTful APIs using ASP.NET 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 building RESTful APIs:
5066

5167
1. **Models**: The `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.
5268
2. **Repositories**: The `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.
5369
3. **Services**: The `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.
54-
4. **Controllers**: The `UI` project contains controllers that handle HTTP requests and responses. Update or create new controllers to expose the CRUD endpoints for your entities.
70+
4. **Controllers**: The `API` project contains controllers that handle HTTP requests and responses. Update or create new controllers to expose the CRUD endpoints for your entities. Implement the appropriate HTTP methods (GET, POST, PUT, DELETE) and perform actions on the core services accordingly.
5571

5672
Make sure to update the routes, validation, and error-handling logic to align with your application requirements and best practices.
5773

5874
## Authors
5975

6076
If you have any questions or need further assistance, please contact the project author at [@kawser2133](https://www.github.com/kawser2133) || [![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kawser2133)
6177

78+
<a href="https://www.buymeacoffee.com/kawser" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a><br/>
79+
**Thanks for your support!**
80+
6281
## Contributing
6382

64-
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.
83+
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.
6584

6685
## License
6786

68-
This project is licensed under the [MIT License](LICENSE).
87+
This project is licensed under the [MIT License](LICENSE)."

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /