The project was built using Visual Studio 2022 targeting .NET 6
The aim of this repository is to provide an implementation of the Mediator pattern without using any third-party libraries such as MediatR.
When using the likes of MediatR through-out your code, you quickly become dependant of that implememtation, which can provide issues later down the line. By implementing your own version of the Mediator pattern, you gain back more control over your codebase.
The approach for this application was based on the following blog post (https://cezarypiatek.github.io/post/why-i-dont-use-mediatr-for-cqrs/) and provides further reasons for your own implementation.
This solution follows the Clean Architecture approach by Jason Taylor and consists of the following:
This layer is a Web API that provides all the endpoints of the application
This layer is a simple class library that contains classes for accessing external resources such as web services. These classes should be based on interfaces defined within the application layer.
This layer is a simple class library that contains all application logic. It is dependent on the domain layer, but has no dependencies on any other layer or project.
This layer defines interfaces that are implemented by outside layers. For example, if the application need to access a notification service, a new interface would be added to application and an implementation would be created within infrastructure.
This layer is a simple class library that contains all entities, enums, exceptions, interfaces, types and logic specific to the domain layer.