Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mladenkn/social-network-asp-net-core-example
A web api for social network application built with ASP.NET Core.
https://github.com/mladenkn/social-network-asp-net-core-example
architecture aspnet-core cqrs ddd domain-driven-design mediatr patterns usecase
Last synced: 3 months ago
JSON representation
A web api for social network application built with ASP.NET Core.
- Host: GitHub
- URL: https://github.com/mladenkn/social-network-asp-net-core-example
- Owner: mladenkn
- Created: 2018-09-25T12:15:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-12T23:42:36.000Z (about 6 years ago)
- Last Synced: 2024-08-04T13:01:22.155Z (6 months ago)
- Topics: architecture, aspnet-core, cqrs, ddd, domain-driven-design, mediatr, patterns, usecase
- Language: C#
- Homepage:
- Size: 1.21 MB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dotnet - social-network-asp-net-core-example - A web api for social network application built with ASP.NET Core. (Libraries, Frameworks and Tools / Networking)
README
# Social Network
Frameworks/libraries used:
* ASP.NET Core
* Entity Framework Core
* MediatR
* AutoMapper
* FluentValidation
* XUnit and FluentAssertions for testsProject contains ApplicationKernel libraries which can be reused on other projects which use similar technologies.
### The Use case pattern
Every use case / request to the system is either a command or a query, and each is coded in a separate file. It consists of a request model structure, the use case handler/executor (which is called by mediator), and optionally a fluent validator.
Since all of the domain logic is coded in the use cases, controller actions usually consist of just one line that dispatches the request to the mediator.
Result of the use case executor is an object of type Response, which is automatically converted into IActionResult in ApiRequestHandler class, before it's returned to controller.