MediatR 7.0.0 Released

Release notes: MediatR 7.0.0 MediatR.Extensions.Microsoft.DependencyInjection 7.0.0 It's a major release bump because of a breaking change in the API of the post-processor. Enjoy! [Read More]

Sharing Context in MediatR Pipelines

MediatR, a small library that implements the Mediator pattern, helps simplify scenarios when you want a simple in-memory request/response and notification implementation. Once you adopt its pattern, you'll often find many other related patterns start to show up - decorators, chains of responsibility, pattern matching, and more. Everything starts with a very basic implementation - a handler for a request: public interface IRequestHandler<in TRequest, TResponse> where [Read More]

Life Beyond Distributed Transactions: An Apostate's Implementation - Dispatching Example

Posts in this series: A Primer Document Coordination Document Example Dispatching Example Failures and Retries Failure Recovery Sagas Relational Resources Conclusion Sample code from this series In the last post, we looked at refactoring our documents to use messaging to communicate changes. We're still missing something, however - the dispatcher: Our dispatcher is the main component that facilitates document communication. For a given document, it needs to: Read messages out [Read More]

MediatR 5.1 Released

This release changes the default behavior of awaiting an enumerable of Task. Previous to this release, tasks where awaited using Task.WhenAll. This causes problems in a variety of environments and situations that expect sequential ordering. In this release, the default behavior for enumerables is to await in a foreach, for: Mediator.Publish RequestPreProcessorBehavior RequestPostProcessorBehavior You can override the Mediator.Publish behavior by overriding the virtual PublishCore method, while the [Read More]

Contoso University Examples with CQRS, MediatR, AutoMapper and more

I was a bit surprised yesterday to see Scott Hanselman's post on my Contoso University sample app. That application basically takes the traditional Contoso University sample applications (of which there have been many), and try to adapt it to how our "normal" ASP.NET applications are built. Mainly these applications serve as working examples for our own internal teams, so that when we spin up a new application, we have [Read More]