Тёмный

MediatR Validation and the Chain of Responsibility Pattern 

Ardalis
Подписаться 12 тыс.
Просмотров 3,2 тыс.
50% 1

MediatR, Validation, and the Chain of Responsibility Pattern
Download the source code:
mailchi.mp/ardalis/youtube-me...
Hey everyone, I'm Steve Smith aka ardalis, of NimblePros!
In this video we take a look at how to pull validation out of our Web/UI layer and move it closer to our business/domain layer. We're using CQRS and MediatR with Clean Architecture to implement the Chain of Responsibility Pattern. The actual validation is using FluentValidation.
Links
github.com/ardalis/CleanArchi...
github.com/jbogard/MediatR
github.com/FluentValidation/F...
github.com/ardalis/Result
• When To Validate and W... (When to Validate and When to Throw Exceptions?)
Check out my courses:
ardalis.com/training-classes/
www.pluralsight.com/authors/s...
Consulting and Training: NimblePros.com and @nimblepros
Developer Group Mentoring: devBetter.com
Free Weekly Email Tips:
ardalis.com/tips/
If you read this far, I hope you liked the video and consider subscribing to my channel!
Find me:
ardalis.com
/ ardalis
github.com/ardalis
/ stevenandrewsmith
bsky.app/profile/ardalis.com
#dotnet #deviq #ardalis #nimblepros #visualstudio #csharp #designpatterns #nuget #cleancode #validation #fluentvalidation #result #cleanarchitecture #mediatr #chainofresponsibility

Наука

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

 

5 дек 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@joshuawilliams8230
@joshuawilliams8230 18 дней назад
Your SOLID course on Pluralsight is so good! I also love your DDD course with Julie Lerman
@fizmhd
@fizmhd 5 месяцев назад
thanks for making videos, have been using your libraries, its great to see that you are on RU-vid.
@Ardalis
@Ardalis 4 месяца назад
Glad you like them!
@coderider3022
@coderider3022 7 месяцев назад
Yip, definitely use it with a fluent result return type (validation error mapped to reason) and I return this as a failure instead of calling next.
@Ardalis
@Ardalis 3 месяца назад
Agreed.
@pavelernestonavarroguerrer7871
@pavelernestonavarroguerrer7871 7 месяцев назад
Thanks a lot! An excelent and practical use of the behaviors!
@Ardalis
@Ardalis 3 месяца назад
Glad you enjoyed it!
@rezaabolhasanzadeh6845
@rezaabolhasanzadeh6845 7 месяцев назад
tnx Steve . I love your content and way of teaching . I'm surprised your channel has few subs . please be more active on youtube . your knowledge is really usefull
@Ardalis
@Ardalis 7 месяцев назад
Thanks! Aiming for weekly videos; we’ll see how it goes.
@Ardalis
@Ardalis 7 месяцев назад
Thanks! Aiming for weekly videos; we’ll see how it goes.
@mesutdemirci7933
@mesutdemirci7933 4 месяца назад
Thanks a lot!
@Ardalis
@Ardalis 4 месяца назад
You're welcome!
@herewegotoday
@herewegotoday 2 месяца назад
I currently use the template method pattern for ensuring multiple features always create an audit log for the task. Would the chain of responsibility pattern be better suited for such a thing? It certainly seems more elegant.
@Ardalis
@Ardalis 2 месяца назад
It would almost certainly require less code and would eliminate inheritance, which usually simplifies designs. I'd say it's worth trying it and then you can assess which you prefer.
Далее
5 Rules For DTOs
17:56
Просмотров 38 тыс.
Refactoring C# with Chain of Responsibility
6:43
Просмотров 7 тыс.
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Frank Now VS Then Edit 🥵| #brawlstars #shorts
00:18
Deliver Better PowerPoint Presentations
9:03
Просмотров 1,4 тыс.
Your web app but good: Aaron Boodman (Local-First Conf)
19:36
The MediatR Feature NOBODY Is Using!
12:38
Просмотров 3,7 тыс.
Chain of Responsibility Design Pattern (C#)
8:40
Просмотров 7 тыс.
Don't throw exceptions in C#. Do this instead
18:13
Просмотров 252 тыс.
ChatGPT Can Pair Program?!?
20:09
Просмотров 2,2 тыс.
STOP Debugging and Start Running in Visual Studio
8:06