Become a Patreon and get source code access: 🤍🤍patreon.com/nickchapsas Check out my courses: 🤍nickchapsas.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
what happen if i need to modify an entity, i must write all the fields of that entity inside of UpdateUserCommand?
Last time I looked at Mediator it implemented the 'service locator pattern' which is a known anti pattern of designing applications which are highly decoupled? I could be wrong though....
where is a link to the source? thank u.
Do you have an episode that lists the tooling you use in Visual Studio? Thanks for the great content.
One question. Now that we have minimal api, and we have IEndpoint for each api that can contain relevant dependent classes and code. Does it still make sense to use MediatR with minimal api. Keep up good work.
Great explanation! I was wondering. When it is a small application this seems good. But when it grows and someone new start working on the project it might be hard to find the handler file.
Because from what I can understand you can't use F12 to go to the handler. Is there a better way to create the classes so you can find the handler for the methods you are calling?
Hi Nick, thanks. MediatR seems to require a lot of boilerplate code. It locks you in to the tool. Is it really that useful? Is it still used a lot in .net 6, now going to 7?
Please share the code
Thank You for this tutorial:) It seems pretty easy now:)
Nice and sweet, sounds perfect, currently in mi job I have like 30 services and repos for every controller..... that is super dirty.
this class is very helpful for beginner .. think you sir
In the handler , if we inject logger service how is that going to capture exceptions related to db connection.
How do i cast my object to Task<Object>.
I have Model class and i want to convent that class object to Task<object>.
where is part 2 video, I'm expecting a series in this topic
where is rest of the videos? can you pls share the playlist link
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?
I'm still not totally convined that MediatR is a 'better' option than simple DI, other than making it harder to find the implementations
Call handler interface from controller and you won’t need the Mediatr layer
Hm, instead of writing all those "private readonly Type _fieldname;", just write parameter in ctor and lets rider/resharper do all this stuff.