Add validation to a MediatR behavior pipeline?
I'm using ASP.NET Core, the built-in container, and MediatR 3 which supports "behavior" pipelines : public class MyRequest : IRequest<string> { // ... } public class MyRequestHandler : IRequestHandler<MyRequest, string> { public string Handle(MyRequest message) { return "Hello!"; } } public class MyPipeline<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> { public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next) { var response = await next(); return response; } } // in `Startup.ConfigureServices()`: services.AddTransient(typeof