This CQRS Template is a starting point for building .NET 8 applications following the Command Query Responsibility Segregation (CQRS) design pattern. It utilizes the Mediator package to achieve clear separation of commands and queries, facilitating maintenance and scalability. The project includes examples of using both in-memory databases for rapid development and testing, as well as SQL Express for more persistent storage solutions.
- CQRS pattern implementation with Mediator for handling commands and queries.
- Examples of using both in-memory and SQL Lite databases.
- Integration with ASP.NET Core 8 for building RESTful APIs.
- Swagger/OpenAPI for API documentation and testing.
- .NET 8 SDK
- Visual Studio 2022 or later, or an equivalent IDE that supports .NET 8.
- SQL Lite (for SQL database examples).
-
Clone the repository:
git clone https://github.com/steckdev/CqrsTemplate.git
-
Navigate to the project directory:
cd CqrsTemplate
-
Restore dependencies:
dotnet restore
-
Update the database (if using SQL Lite):
dotnet ef database update
-
Run the application:
dotnet run
- The application is configured to start with Swagger UI to explore and test the API endpoints.
- Use the Swagger UI at
https://localhost:7105/swagger
to send requests to the application.
Contributions are welcome. Please open an issue to discuss proposed changes or open a Pull Request with detailed descriptions of your contributions.
This project is licensed under the MIT License - see the LICENSE file for details.