Fluent Validation in MediatR with Results

Опубликовано: 22 Март 2026
на канале: Ardalis
7,910
203

Fluent Validation in MediatR with Results

Hey everyone, I'm Steve Smith aka ardalis, of NimblePros!

In this video we extend the previous video's MediatR behavior-based validation to work with a Result abstraction. In this way, we're able to return the validation errors back to the API endpoint in a way that allows it to return a 400 Bad Request rather than just a 500 Server Error.

Get The Source Code

https://mailchi.mp/ardalis.com/youtub...

Links

https://github.com/ardalis/CleanArchi...
https://github.com/jbogard/MediatR
https://github.com/FluentValidation/F...
https://github.com/ardalis/Result

C# Generics Best Practices Course:
https://www.pluralsight.com/courses/w...

Check out my courses:
https://ardalis.com/training-classes/
https://www.pluralsight.com/authors/s...

Consulting and Training: https://NimblePros.com and @nimblepros

Developer Group Mentoring: https://devBetter.com

Free Weekly Email Tips:
https://ardalis.com/tips/

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

Find me:
https://ardalis.com
  / ardalis  
https://github.com/ardalis
  / stevenandrewsmith  
https://bsky.app/profile/ardalis.com

#dotnet #deviq #ardalis #nimblepros #visualstudio #csharp #designpatterns #nuget #cleancode #validation #fluentvalidation #result #cleanarchitecture #mediatr #chainofresponsibility