Тёмный

The MediatR Feature NOBODY Is Using! 

Codewrinkles
Подписаться 27 тыс.
Просмотров 3,8 тыс.
50% 1

If you use MediatR, chances are that your handlers get cluttered by a lot of cross-cutting concerns. That's because MediatR has actually the best feature ever, but nobody is using it! Yes, I talk about pipeline behaviors. But worry not, I've got your back! In this video I'll show you everything you need to know to make the best out of MediatR pipeline behaviors!
#dotnet #csharp #aspnetcore
Join this channel to get source code access and other perks:
/ @codewrinkles
Content:
1.Intro: 00:00
2. Messy MediatR handlers: 00:28
3. Introducing Pipeline Behaviors: 02:03
4. Logging pipeline behavior: 02:31
5. Types of pipeline behaviors: 04:33
6. Validation pipeline behavior: 05:04
7. Pipeline behavior registration order: 07:36
8. Pipeline behaviors and result pattern: 09:14
Also follow me here (especially if you are a self taught developer):
✅My other channel: / @danpatrascutech
✅Facebook: / danpatrascutech
✅Instagram: / danpatrascutech
✅TikTok: / danpatrascutech

Наука

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

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@rsemihkoca
@rsemihkoca 5 месяцев назад
explanations are luminous, since I am too lazy to read the documentation time to time, i first check your channel. Great work
@Codewrinkles
@Codewrinkles 5 месяцев назад
So nice of you. Thanks for checking the channel from time to time.
@3litepker
@3litepker 2 месяца назад
I know the background music is very low but is it necessary? Also, doesn't this just make the solution more messy if you need to create a new validation class for each and every request handler when you can do it directly in there?
@mattdowns358
@mattdowns358 Год назад
I use pipeline behaviors all the time. Great feature. I’m not a fan of creating a generic behavior and then binding it to a specific request. If you insist on doing it like that, could you have not just implemented the interface with the appropriate concrete request and response instead?
@RJ-sw7zv
@RJ-sw7zv Год назад
Lol, been using this since I started using mediatR. Great for Unit of work patterns.
@pilotboba
@pilotboba Год назад
I know the title is click bait, but I thought most people use the behavior pipeline. :)
@Codewrinkles
@Codewrinkles Год назад
Wel it sounds clickbait, but that's the experience I had so far in most of the already existing projects I was ever in touch with and a random browse through GitHub repositories, I can count on the fingers of one hand alone how many times I saw pipeline behaviors. If you had a different experience, I envy you :)
@pilotboba
@pilotboba Год назад
@@Codewrinkles Not 100% of code is in public repos. :)
@allannielsen4752
@allannielsen4752 10 месяцев назад
@@Codewrinkles probably because the rest of us don't use mediator and just use middleware pipeline for exactly the same thing. I'm not a fan of all these abstraction layers as it makes the code too complex to follow and adds cognitive load that isn't really needed. The performance hits we take with all this abstraction and layering takes a huge hit too, I know it depends, but "everyone" is pushing these techniques without mentioning the compromise we take when introducing them.
@StuartQuinn
@StuartQuinn 6 месяцев назад
@@Codewrinkles I've never seen MediatR used without behaviours. Whenever I've advocated for implemented MediatR, they've pretty much been the whole point of using the library. Maybe it's the difference between private and public code that explains the difference in our experiences?
@semen083
@semen083 3 месяца назад
Hi, give a advice please. How to combine IPipelineBehavior and global IRequestExceptionHandler for requests? For example if I have a global(for all requests) loging request behaviour and global RequestExceptionHandler when exception raised in RequestHandler there is no return to behaviour class, so I can't log like -request {name} started -request {name} raised exception/completed successful I can't also use behaviour for exception because there is no RequestExceptionHandlerState object for call SetHandled. Thanks
Далее
TOP 3 .NET Libraries I Use In Every Project
14:12
Просмотров 7 тыс.
Forget Everything You Know About MediatR!
11:22
Просмотров 18 тыс.
Выпускаем трек? #iribaby
00:14
Просмотров 164 тыс.
Don't throw exceptions in C#. Do this instead
18:13
Просмотров 254 тыс.
How slow is MediatR really?
15:51
Просмотров 60 тыс.
Why I DON'T use MediatR in ASP.NET Core
21:51
Просмотров 14 тыс.
You DON'T want an In-Memory Event Bus like MediatR
11:20
Mediator - DESIGN PATTERNS (C#/.NET)
16:15
Просмотров 3 тыс.
Don't let MediatR hold you back, try this...
17:48
Просмотров 12 тыс.
iPhone 16 - НЕ СТОИТ ПРОПУСКАТЬ
4:50