PipelinePlus bundles common MediatR pipeline behaviors into a small, plug-and-play library to reduce boilerplate in .NET apps.
What’s included:
– Validation (FluentValidation)
– Caching (attribute-driven with opt-out)
– Idempotency (deduplicate command handling)
– Outbox (persist and dispatch events)
– Performance (timing hooks)
– Exception mapping (turn exceptions into consistent results/logs)
Motivation: In most MediatR projects, these cross-cutting concerns get reimplemented again and again. PipelinePlus aims to make them composable, testable, and easy to adopt without locking you in.
Install:
dotnet add package PipelinePlus
Minimal usage:
// Program.cs / composition root
services.AddMediatR(typeof(Program));
services.AddPipelinePlus(); // registers the behaviors
// Example request
[Idempotent]
public record CreateOrder(Guid Id, string Sku) : IRequest;
// Example validator (FluentValidation)
public class CreateOrderValidator : AbstractValidator {
public CreateOrderValidator() {
RuleFor(x => x.Sku).NotEmpty();
}
}
Notes:
– Outbox/Idempotency plug into your own storage abstractions.
– Works on .NET 8/9 and latest MediatR.
– MIT licensed.
Repo: https://github.com/ilkanozbek/PipelinePlus
Feedback welcome—API shape, naming, and ideas for the next behaviors (e.g., OpenTelemetry integration, Redis/distributed cache helpers).
Comments URL: https://news.ycombinator.com/item?id=45238904
Points: 1
# Comments: 0
Source: github.com
