MediatR Validation and the Chain of Responsibility Pattern

preview_player
Показать описание
MediatR, Validation, and the Chain of Responsibility Pattern

Download the source code:

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

Check out my courses:

Free Weekly Email Tips:

If you read this far, I hope you liked the video and consider subscribing to my channel!

Find me:

#dotnet #deviq #ardalis #nimblepros #visualstudio #csharp #designpatterns #nuget #cleancode #validation #fluentvalidation #result #cleanarchitecture #mediatr #chainofresponsibility
Комментарии
Автор

thanks for making videos, have been using your libraries, its great to see that you are on YouTube.

fizmhd
Автор

Your SOLID course on Pluralsight is so good! I also love your DDD course with Julie Lerman

joshuawilliams
Автор

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.

coderider
Автор

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

rezaabolhasanzadeh
Автор

Thanks a lot! An excelent and practical use of the behaviors!

pavelernestonavarroguerrer
Автор

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.

herewegotoday
Автор

Hi Ardalis, love the segment. Do you think it would make sense to add fluent validation on every step sort of like an anti corruption layer within the layers of the clean architecture?

evilroxxx