No video

MediatR Validation and the Chain of Responsibility Pattern

  Рет қаралды 3,475

Ardalis

Ardalis

Күн бұрын

MediatR, Validation, and the Chain of Responsibility Pattern
Download the source code:
mailchi.mp/ard...
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/ard...
github.com/jbo...
github.com/Flu...
github.com/ard...
• When To Validate and W... (When to Validate and When to Throw Exceptions?)
Check out my courses:
ardalis.com/tr...
www.pluralsigh...
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/ard...
/ stevenandrewsmith
bsky.app/profi...
#dotnet #deviq #ardalis #nimblepros #visualstudio #csharp #designpatterns #nuget #cleancode #validation #fluentvalidation #result #cleanarchitecture #mediatr #chainofresponsibility

Пікірлер: 15
@joshuawilliams8230
@joshuawilliams8230 2 ай бұрын
Your SOLID course on Pluralsight is so good! I also love your DDD course with Julie Lerman
@Ardalis
@Ardalis Ай бұрын
Thanks so much!
@fizmhd
@fizmhd 6 ай бұрын
thanks for making videos, have been using your libraries, its great to see that you are on KZbin.
@Ardalis
@Ardalis 5 ай бұрын
Glad you like them!
@coderider3022
@coderider3022 8 ай бұрын
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 5 ай бұрын
Agreed.
@rezaabolhasanzadeh6845
@rezaabolhasanzadeh6845 8 ай бұрын
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 8 ай бұрын
Thanks! Aiming for weekly videos; we’ll see how it goes.
@Ardalis
@Ardalis 8 ай бұрын
Thanks! Aiming for weekly videos; we’ll see how it goes.
@pavelernestonavarroguerrer7871
@pavelernestonavarroguerrer7871 8 ай бұрын
Thanks a lot! An excelent and practical use of the behaviors!
@Ardalis
@Ardalis 5 ай бұрын
Glad you enjoyed it!
@mesutdemirci7933
@mesutdemirci7933 6 ай бұрын
Thanks a lot!
@Ardalis
@Ardalis 6 ай бұрын
You're welcome!
@herewegotoday
@herewegotoday 3 ай бұрын
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 3 ай бұрын
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.
How This New Battery is Changing the Game
12:07
Undecided with Matt Ferrell
Рет қаралды 176 М.
طردت النملة من المنزل😡 ماذا فعل؟🥲
00:25
Cool Tool SHORTS Arabic
Рет қаралды 10 МЛН
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 13 МЛН
Ik Heb Aardbeien Gemaakt Van Kip🍓🐔😋
00:41
Cool Tool SHORTS Netherlands
Рет қаралды 7 МЛН
5 Rules For DTOs
17:56
Ardalis
Рет қаралды 40 М.
Using Ardalis Specifications with EF Core 8
13:06
Ardalis
Рет қаралды 6 М.
When To Validate and When To Throw Exceptions?
11:00
Ardalis
Рет қаралды 8 М.
.NET and C# are in trouble. Here is what I'd do.
10:57
Ed Andersen
Рет қаралды 31 М.
Event-Driven Architecture For Websockets With .NET 8 & C# 🛠️ [FULLSTACK 2024 VIDEO 2]
23:56
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 143 М.
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
SavvyNik
Рет қаралды 167 М.
Chain of Responsibility Design Pattern (C#)
8:40
Raw Coding
Рет қаралды 7 М.
Fluent Validation in MediatR with Results
7:18
Ardalis
Рет қаралды 4,7 М.
If Your Code Looks Like This... You're A GOOD Programmer
16:39
Continuous Delivery
Рет қаралды 60 М.
طردت النملة من المنزل😡 ماذا فعل؟🥲
00:25
Cool Tool SHORTS Arabic
Рет қаралды 10 МЛН