Clean architecture with CQRS and MediatR in Asp.Net Core

preview_player
Показать описание
In this video we tackle a very specific approach to clean architecture in #AspNetCore: with CQRS and MediatR. We kick off the video on the blackboard explaining what CQRS and the mediator pattern are and then we jump into code and implement these concepts in a new solution.
#SoftwareArchitecture #DotNet

Mentioned videos:

Chapers
1. Intro: 00:00
2. What is CQRS? 01:57
3. What is the mediator pattern? 15:18
4. Reviewing solution setup: 19:40
5. Creating the folder structure in the application layer: 21:45
6. Installing MediatR: 23:02
7. Creating a query and query handler: 25:08
8. Working with queries and Mediator in controller: 30:36
9. Creating a command and command handler: 33:23
10. Working with commands and Mediator in controller: 37:27
Рекомендации по теме
Комментарии
Автор

I like how the box of the last command was so bad that the autocorrect didn't get that it was a square 😂. Amazing explanation, Dan.

diegoromero-lovo
Автор

I was watching 3 or more videos before I hit this one. I didn't understand the pattern using previous videos & this one really helped me to pick up the topic. Thank you!

vijai
Автор

I use almost identical to this architecture and it's quite useful and incredibly easy to do unit testing.

SEA_
Автор

Great content! Thanks for your time to share your thoughts.

rafapioli
Автор

Thnk you so much! But what about usage of Requests and Responses along with a CQRS as DTOs? Do you have any videos about that Dan?

torrvic
Автор

can we have the copy of the code on this one? thanks!

curlybytes
Автор

Thank you for the video. I really the way you explain and show things. I have a question about CQRS: For every single action on the controller we need a new class using mediatR? Like, if I have 10 different querys, I would have 10 different classes? Thank you very much.

cicerofoscarini
Автор

Nice to see another Rider aficionado! 👍

abuuthmaan
Автор

Maybe a dumb question, where is forecast request object coming from? . Currently in php, this is taking the most of our time, mapping a (psr) request to a command with valid values.

ramonennik
Автор

please tell me which tool u r using to draw with pen, that is correcting the shapes.. please pelase pelase

prateekbhardwaj
Автор

fantastic video . good luck and please record more videos

alirezasariri
Автор

Sorry for the question but in clean architecture we need to use a presenter to convert and prepare viewmodels to show in our UI. Why you don't use it??

ckmicpan
Автор

A recruiter asked me why commands are in Application layer. What should I say?

alpachinois
Автор

How can we do unit testing for such a controller?

aminkhosravi
Автор

Application should not depend on Infrastructure.... the clean architecture clearly fails in this case

shubhankarpaul