mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-17 08:26:28 +08:00
Update README.md
This commit is contained in:
parent
530a8479c1
commit
38ec5fae5a
@ -119,7 +119,9 @@ When adding or changing a feature in an application in n-tire architecture, we a
|
||||
|
||||
With this approach, each of our vertical slices can decide for itself how to best fulfill the request. New features only add code, we're not changing shared code and worrying about side effects.
|
||||
|
||||

|
||||
<div align="center">
|
||||
<img src="./assets/vertical-slice-architecture.png" />
|
||||
</div>
|
||||
|
||||
Instead of grouping related action methods in one controller, as found in traditional ASP.net controllers, I used the [REPR pattern](https://deviq.com/design-patterns/repr-design-pattern). Each action gets its own small endpoint, consisting of a route, the action, and an `IMediator` instance (see [MediatR](https://github.com/jbogard/MediatR)). The request is passed to the `IMediator` instance, routed through a [`Mediatr pipeline`](https://lostechies.com/jimmybogard/2014/09/09/tackling-cross-cutting-concerns-with-a-mediator-pipeline/) where custom [middleware](https://github.com/jbogard/MediatR/wiki/Behaviors) can log, validate and intercept requests. The request is then handled by a request specific `IRequestHandler` which performs business logic before returning the result.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user