Тёмный

Clean ASP.NET Core API using MediatR and CQRS | Setup 

Nick Chapsas
Подписаться 295 тыс.
Просмотров 320 тыс.
50% 1

Become a Patreon and get source code access: / nickchapsas
Check out my courses: dometrain.com
Hello everybody I'm Nick and in this ASP.NET Core tutorial I will show you how you can use CQRS and MediatR to clean up your applications. I will briefly explain what CQRS and the Mediator patterns are and how they apply in our use-case. The I will show you how you can use the MediatR package to decouple your API layer from your application layer, leading to more testable and manageable code.
Don't forget to comment, like and subscribe :)
Social Media:
Follow me on GitHub: bit.ly/ChapsasGitHub
Follow me on Twitter: bit.ly/ChapsasTwitter
Connect on LinkedIn: bit.ly/ChapsasLinkedIn
#aspnetcore #mediatr #cqrs #tutorial

Опубликовано:

 

1 дек 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 321   
@pratiks6576
@pratiks6576 3 года назад
I don't think I could have gotten such a clear explanation of this pattern anywhere else on the web. Thanks Nick !
@najibmestaoui6950
@najibmestaoui6950 3 года назад
You can't imagine how happy I am after watching this video! Thank you.
@zokocx
@zokocx 3 года назад
Great starting tutorial with enough introduction theory, I never used MediatR or even mediator pattern (been stuck at legacy project) And I really like how MediatR effortlessly made implementing of query and command almost trivial in CQRS pattern. Keep the excellent videos coming and keep coding. PS: your videos are worth more than price of coffee to see the source
@ahmedshaker1695
@ahmedshaker1695 4 года назад
Perfect for whom wanna to start and get into MediatR and CQRS , keep up the great work man
@babakbahrami3384
@babakbahrami3384 4 года назад
did you find the project repo on github or not?
@AlejandroVivas
@AlejandroVivas Год назад
Video from 2019 and still applies today. This was very well explained. Thank you!
@MR-ne5ww
@MR-ne5ww 3 года назад
00:00 : Introduction 00:22 : Mediator 02:25 : CQRS 05:27 : Design Overview 06:45 : Coding
@sergiohuanca4812
@sergiohuanca4812 3 года назад
Love your content Nick. I'm just a newbie but learning a lot with your videos! Greetings from Perú!
@jeremi84
@jeremi84 4 года назад
I pressed like and subscribed by just watching the first 8 mins of this video, it's one of the best explanations without going full-blown detail yet I understand the main concept! well done!
@gunnerr91
@gunnerr91 3 года назад
nick, tim corey and les jackson, all create amazing dotnet content for free and helping me out a lot!
@florin.soldan
@florin.soldan 3 года назад
Really good explanation and the demo was great, not too much not too less, really good balance. Thanks!
@triggerhappy899
@triggerhappy899 3 года назад
Great video! Maybe because I setup my project almost identitcal. I'm loving how the code is so organized and clean!
@ilovepandaypoe6056
@ilovepandaypoe6056 4 года назад
really really great tutorial. I was able to follow along and everything working as expected. wow!
@adrenalinea953
@adrenalinea953 3 года назад
best video regarding MediatR and CQRS I could find! Thanks a lot!
@mohamedelbasmy5160
@mohamedelbasmy5160 4 года назад
I really enjoy watching your videos, very interesting tops and very clear explanation, Thanks you so much for all your efforts. we wait all your newly tutorials.
@digitalfriday
@digitalfriday 4 года назад
really great tutorial! cant wait for part 2!
@maidamsanthosh9612
@maidamsanthosh9612 4 года назад
What an explanation, easily understood. Thanks for the video..
@ben.thornhill
@ben.thornhill 4 года назад
Awesome content! You are a great teacher. Keep up the great work. I subscribed and look forward to more videos.
@danielchikaka
@danielchikaka 4 года назад
Wow! Thanks so much for the wonderful video. Keep 'em coming!
@talkathiriify
@talkathiriify 4 года назад
Thank you very much for the awesome series. Please keep it up.
@nawarajkhadka9502
@nawarajkhadka9502 4 года назад
As simple as that.. The best one ever !! Thanks!!
@CollegeCode
@CollegeCode 4 года назад
Excellent video Nick! Keep up the great work.
@MrRozekkk
@MrRozekkk 3 года назад
Thanks for that tutorial. Very clearly described what to use and how. I've liked that CQRS pattern :D You deserve sub and like :)
@kukrejasunny9585
@kukrejasunny9585 3 года назад
This is exactly what I was looking for, Thanks @Nick Chapsas
@haythambaidda6045
@haythambaidda6045 4 года назад
Nice presentation and implementation. Thank you.
@giorgioqruadze1122
@giorgioqruadze1122 3 года назад
This was great tutorial, thank you for sharing it with us.
@ajagbequadri2926
@ajagbequadri2926 4 года назад
this is one of the best tutorials on CQRS.
@Mexicankampungboi
@Mexicankampungboi 3 года назад
Brilliant tutorial! This is very clear, thank you :)
@mmsky
@mmsky 4 года назад
Great tutorial, awesome explanation. Thank you so much for providing the source code.
@abdulhameed-lx2cr
@abdulhameed-lx2cr 2 года назад
How to get the source code of this tutorial
@ernestmfakudze
@ernestmfakudze 3 года назад
Thanks Nick. Beautifully explained.
@tamerezzeldin4404
@tamerezzeldin4404 3 года назад
Great and simply explained. Thanks!
@greident
@greident 4 года назад
Thank you man! You really help me to understand
@fullstackdotnet
@fullstackdotnet 4 года назад
amazing explanation, keep it up, thank you.
@bhushanmulmule7885
@bhushanmulmule7885 4 года назад
Finally long time search ended here :)
@anandrokzz
@anandrokzz 3 года назад
Its clear! You really did a good job .👍🏼😊
@karthicks859
@karthicks859 4 года назад
Nick before this video , i tried learning with the use of Event source but explanation was vague/not clear.Your video gave lot of confident in terms of implementation...Thanks a lot Nick, i subscribed too :)
@Rahil1978a
@Rahil1978a 4 года назад
Excellent explanation. I love it
@mikaeledebro1144
@mikaeledebro1144 3 года назад
Excellent video! Thanks for this!
@nikolinavukovic7165
@nikolinavukovic7165 Год назад
Fantastic explanation, well done!
@emerynoel567
@emerynoel567 Год назад
At my last job, we created our own implementation of this (I didn't know about mediatr). It worked very well and was very clean, the only downside was that we didn't do any scanning, so we had to manually map all of our query/commands and responses. We had a giant wall of them. 🙃 Mediatr looks like it would have made life a fair bit easier!
@sureshsambana5219
@sureshsambana5219 Год назад
Very neat and clean explanation
@MrRapic
@MrRapic 4 года назад
Nice video, keep up the good work!
@pawenowak5144
@pawenowak5144 2 года назад
Thank You for this tutorial:) It seems pretty easy now:)
@i.paradox
@i.paradox 3 года назад
Thanks a lot for this beautiful explanation. Good Luck.
@ngenohillary266
@ngenohillary266 3 года назад
Very Elaborate, thanks Nick.
@harshpatel-wr1jl
@harshpatel-wr1jl 4 года назад
Perfect and Cool Explanation .. Thanks sir :)
@AnilKumar-xx1io
@AnilKumar-xx1io 2 года назад
this class is very helpful for beginner .. think you sir
@DevDiegoSanches
@DevDiegoSanches 4 года назад
Very good bro.. Tks for sharing.
@jojojawjaw
@jojojawjaw 3 года назад
Great tutorial, thank you
@vladkorsak2163
@vladkorsak2163 3 года назад
So helpful. Thank you, sir.
@sabermotamedi6041
@sabermotamedi6041 3 года назад
Thank You Mr. Chapsas
@md.mizanurrahmanmilon3745
@md.mizanurrahmanmilon3745 4 года назад
Love the way you explained and it's really easy to understand. Thanks a lot, keep the amazing work.
@godwinyoh3700
@godwinyoh3700 3 года назад
Such an amazing video. Thanks very much.
@armanx2
@armanx2 4 года назад
Great video and very nice explanation
@ssubbuanil1
@ssubbuanil1 4 года назад
Good article !! Thank you ..
@danielarandamartin2709
@danielarandamartin2709 2 года назад
Thank you very much! The tutorial was awesome !!
@RaviKumar-td1oj
@RaviKumar-td1oj 2 года назад
Good Video. It helped me to understand CQRS.
@lukasostar3008
@lukasostar3008 4 года назад
crazy good intro, thank you very much! edit: subscribed :D
@guitarplayer1342
@guitarplayer1342 3 года назад
Most excellent tutorial.
@lilter6980
@lilter6980 3 года назад
You’re the best, man!🙏
@narendratiwari4889
@narendratiwari4889 3 года назад
Well explained cover everything in this video 👍
@devmahmod8121
@devmahmod8121 Год назад
Very clear thank you
@pk5006
@pk5006 4 года назад
Perfectly explained. Now i can implement this. Thank you. ☺️
@shashankpandey1019
@shashankpandey1019 4 года назад
No doubt you are really great .🙏
@edelwater
@edelwater 3 года назад
In general this is partly the evolution from a generic service response model to send from services to controllers. I noticed that in some cases when a controller returns multiple http statuses and messages depending on conditions there is an overlap in what you want to return from the service and the return value from the controller. The generic service response model then gets a kind of mapping which makes it confusing. So e.g. if the controller returns status xx1, xx2, xxx3, xxx4, xx5 depending on conditions with different (translated) messages when are only known in the service layer in terms of "content" for the message, there needs to be a mapping somewhere between what the service returns and the controller returns. So in the end the generic model returns a model with e.g. enums or something alike but then the mapping to what http status and which translated message then gets returned (which is more difficult if they are dynamic so not a lookup) is in terms of placement still dependent on what gets being send. (for everything that is generic its easy because you could handle that in a filter or middleware)
@jfpinero
@jfpinero 2 года назад
That's what error filters are for to translate service exceptions or whatever to proper return statuses. No need to re-invent the wheel with enums or whatever.
@hamednikzad911
@hamednikzad911 3 года назад
great tutorial. thanks a lot
@bardin08
@bardin08 3 года назад
Thank you very much. It`s great.
@mohammednhari1737
@mohammednhari1737 4 года назад
thanks! clear explination
@muhammadosama6865
@muhammadosama6865 2 года назад
thanks a lot, keep up the good work.
@udh001
@udh001 4 года назад
Thank you so much.. I was going through all over to understand the MediatR and this extremely helped me.
@bhagidasari9051
@bhagidasari9051 3 года назад
very nice explanation
@anooprawat1006
@anooprawat1006 2 года назад
Just amazing stuff... 👍🏼
@VenkatachalapathiGarapani
@VenkatachalapathiGarapani 4 года назад
simple and clear
@tuliomendelevio8704
@tuliomendelevio8704 4 года назад
so good!!!, Tx tx
@randompoints
@randompoints 4 года назад
Your explanation made it easy to understand. Thank You! #JetBrainsRider
@Ahmad.Weshahi
@Ahmad.Weshahi 3 года назад
Great work, very usueful.
@johanakesson181
@johanakesson181 3 года назад
Love your videos! Would be awesome if you shared your Visual Code settings and making a guide for most common commands etc!
@nickchapsas
@nickchapsas 3 года назад
This is not visual studio code but rather JetBrains Rider
@abrahamrivera3156
@abrahamrivera3156 2 года назад
Nice and sweet, sounds perfect, currently in mi job I have like 30 services and repos for every controller..... that is super dirty.
@clearlyunwell
@clearlyunwell 3 года назад
Beautiful!
@Defense89
@Defense89 2 года назад
WOW Nick Chapsas what a nice formation , subscribed!!!! and also can we get the full project to follow along? like how to create the api you created and then add mediator to it?
@shakirahsanromeo7863
@shakirahsanromeo7863 3 года назад
You deserve more subscribers!
@genereuxalahassa9595
@genereuxalahassa9595 3 года назад
MediatR is beautiful. I loved it. Great explanation. Very helpful. Thanks a lot for the video
@AhmadAbouHamdh
@AhmadAbouHamdh 4 года назад
Thank you very much
@DanteDeRuwe
@DanteDeRuwe 4 года назад
Very interesting!
@robertoaboites418
@robertoaboites418 4 года назад
Where can i get the source code, i cant find it in your github.
@hfcdocsis
@hfcdocsis 4 года назад
Excellent! Very easy to follow. Well articulated.
@janoslaszlo3272
@janoslaszlo3272 3 года назад
Quality video!
@ragerory
@ragerory 4 года назад
Nice. Probably makes sense to create a BaseOrderHandler that injects all those in the ctor so as to not have to duplicate that effort in each handler class?
@anthoniG
@anthoniG 4 года назад
Be nice if you could had some tests around the handlers. Been trying to find these for a while now
@kapquidlat1122
@kapquidlat1122 2 года назад
I'm almost about to try using MediatR at least by itself on my amateurish MVC app but I'm reluctant about over-engineering it? What's your take on over-engineering vs following design patterns and best practices? Hope you come up with a video discussing it. Thanks!
@MaxParedes
@MaxParedes 3 года назад
thank you!!!
@sudar4587
@sudar4587 4 месяца назад
Thank you
@davidpccode
@davidpccode 3 года назад
This is the best explanation in the entire galaxy. Nick which tool/device did you use to draw that way?
@nickchapsas
@nickchapsas 3 года назад
Thanks David! I am using a Microsoft Surface Pro 7 with the Surface pen to draw and the Whiteboard app that comes with the Surface
@MrViouviou
@MrViouviou 3 года назад
really nice explanation; I have been looking for a good example of mediatR since ages.
@triyuga
@triyuga 4 года назад
Nice!
@demosyello9594
@demosyello9594 4 года назад
Ty, dude.
@Fasiibcs
@Fasiibcs 4 года назад
Hi, I am new to your channel just subscribe after watching this video. It was actually really good. I want to make a few suggestions, please consider if you can, - Your speed is quite fast so try to explain more. - The content was really good but at some point, I didn't get the point, I am like what's going on and then repeat the section of the video. Thanks for your good work.
@iT_dev41k
@iT_dev41k 2 года назад
Hi Nick, thanks for your video, that is cool. Please could you say few words about commands should or should not return a entity or so except of result like new entity ID for example. Thank you
@davemasters
@davemasters 2 года назад
This is a really great explanation - nice work, great content.
@thenewmorocco401
@thenewmorocco401 4 года назад
you are the best
@amirmahdighodsi8142
@amirmahdighodsi8142 2 года назад
Thanks for your nice video about the application side of CQRS approach, it was helpful, but what about the server side approach?(where you can separate Database for queries and commands)?(the side you said are not gonna explain in video at 5:21)
@deepakpandey9406
@deepakpandey9406 3 года назад
MediatR makes Class Explotion it's first class citizen. But makes code more clean and clear to understand.
Далее
What is Span in C# and why you should be using it
15:15
Why Developers Hate "Clean Code"?
14:39
Просмотров 58 тыс.
CQRS & MediatR in a .NET 8 Web API 🚀
22:00
Просмотров 4,9 тыс.
asp.net core - MediatR (CQRS) Tutorial & Tips
39:10
Просмотров 65 тыс.
The Blazor Competitor is Here!
15:08
Просмотров 66 тыс.
Don't Use AutoMapper in C#! Do THIS Instead!
16:17
Просмотров 66 тыс.
8 await async mistakes that you SHOULD avoid in .NET
21:13