-
The
ITodoListandITodoListRepositoryinterfaces are registered as singletons to keep values in memory during the application's lifetime. In a real-world scenario, they should be configured as transient or scoped depending on the requirements. -
Unit tests for the service are implemented only for the
AddItemmethod as an example. In a production-ready application, all methods should be covered, although the aggregate already contains unit tests where the domain logic is applied. -
The PrintItems method only sorts the list, while rendering the data is delegated to the presentation layers (Console and Angular). This separation of concerns adheres to the Single Responsibility Principle.
- Open the solution in Visual Studio or your preferred IDE
- Set
Beyond.Todo.Project.ConsoleoBeyond.Todo.Project.WebApias the startup project - Run the application (F5 or
dotnet runif using CLI)
http://localhost:7269 or the port configured in launchSettings.json
- .NET 8.0 SDK
- Visual Studio 2022 or newer (or Visual Studio Code)
- Swagger/OpenAPI client (optional)
- .NET 8 - Cross-platform framework for building APIs and applications.
- ASP.NET Core Web API - For building RESTful services.
- Entity Framework Core - ORM for data access.
- AutoMapper - Library to map objects automatically.
- FluentValidation - For strongly-typed model validation.
- Swashbuckle (Swagger) - For generating Swagger UI for the API.
- xUnit - Unit testing framework for .NET.
- Moq - Mocking library for unit tests.
- FluentAssertions - Provides more readable and expressive assertions in tests.
- Newtonsoft.Json - Popular JSON framework for .NET.