This repo contains:
- REST API service providing all available products of an eshop and enabling the partial update of one product
- Swagger documentation of all endpoints
- Unit tests covering functionality on multiple layers
- Logging
- Caching of loaded data from database
- HATEOAS
I tried to adhere all good principles and standards like:
-
CQRS Command Query Responsibility Segregation
-
Mediator pattern Behavioral pattern for object interaction interaction
-
HATEOAS constraint of the REST application architecture that distinguishes it from other network application architectures
CQRS and Mediator fits each other CQRS & Mediator
- Github
- C#
- .net6
- Entity Framework Core
- MSSQL
- x.Unit
Package | Usage |
MediatR | Mediator for CQRS design pattern |
Autofac | Used better DI Container due to lack of solving injection abstractions with MediatR |
FluentValidation | To construct strongly-typed validation rules for validation pipeline |
Serilog | Logging |
Swashbuckle.AspNetCore | Swagger tools for documentation |
x.PagedList | Pagination IEnumerable/IQueryable extension |
Moq | Mocking framework for Unit tests |
Shouldly | Assertion framework for Unit tests |
- .NET 6 framework
- SQL server with MSSQL database running (db name should be configured in AppSettings.json -> ConnectionStrings field)
IDE | info |
Visual Studio 2022 | (v17.1) |
Visual Studio 2019 for Mac | (v8.10) |
Visual Studio 2022 for Mac | (v17.0 latest preview) |
Visual Studio Code |
- Clone repository from this GitHUb using GitChanges
- Optionaly Rebuild the solution, but this step should be provided automatically
- From package manager console Update-Database to get most recent data and table state
- Set API as startup project
- Run
- Clone repository from this GitHUb using GitChanges
- Optionaly Rebuild the solution, but this step should be provided automatically
- Open Test Explorer
- Run optional or all at once
https://sonarcloud.io/summary/overall?id=Rades98_AlzaCaseStudy