Enigmatry.Entry.MediatR 10.1.0

dotnet add package Enigmatry.Entry.MediatR --version 10.1.0
                    
NuGet\Install-Package Enigmatry.Entry.MediatR -Version 10.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Enigmatry.Entry.MediatR" Version="10.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Enigmatry.Entry.MediatR" Version="10.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Enigmatry.Entry.MediatR" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Enigmatry.Entry.MediatR --version 10.1.0
                    
#r "nuget: Enigmatry.Entry.MediatR, 10.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Enigmatry.Entry.MediatR@10.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Enigmatry.Entry.MediatR&version=10.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Enigmatry.Entry.MediatR&version=10.1.0
                    
Install as a Cake Tool

MediatR Extensions

A library that provides extensions and utilities for working with MediatR, enhancing the mediator pattern implementation with additional features.

Intended Usage

Use this library when you want to extend MediatR with additional behaviors, such as validation, logging, performance monitoring, or transactional support.

Installation

Add the package to your project:

dotnet add package Enigmatry.Entry.MediatR

Usage Example

using Enigmatry.Entry.MediatR;
using MediatR;

// Creating a command with validation
public class CreateUserCommand : IRequest<int>, IValidatable
{
    public string Username { get; set; }
    public string Email { get; set; }
    
    public ValidationResult Validate()
    {
        var result = new ValidationResult();
        
        if (string.IsNullOrEmpty(Username))
            result.AddError("Username is required");
            
        if (string.IsNullOrEmpty(Email) || !Email.Contains("@"))
            result.AddError("Valid email is required");
            
        return result;
    }
}

// Command handler
public class CreateUserCommandHandler : IRequestHandler<CreateUserCommand, int>
{
    public async Task<int> Handle(CreateUserCommand request, CancellationToken cancellationToken)
    {
        // Implementation
        return userId;
    }
}

Dependency Injection Example

Register MediatR with the extension behaviors:

using Enigmatry.Entry.MediatR;

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        // Add MediatR
        services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly));
        
        // Add validation behavior
        services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>));
        
        // Add logging behavior
        services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.0 125 4/16/2026
10.0.1-preview.2 40 4/16/2026
10.0.0 100 4/2/2026
9.6.0 267 3/18/2026
9.5.0 968 1/26/2026
9.4.0 1,745 12/22/2025
9.3.1-preview.3 254 12/18/2025
9.3.1-preview.1 500 11/25/2025
9.3.0 987 11/10/2025
9.2.0 1,529 9/24/2025
9.1.1-preview.5 218 8/8/2025
9.1.1-preview.4 130 6/27/2025
9.1.1-preview.3 159 6/4/2025
9.1.0 1,501 6/3/2025
9.0.1-preview.8 185 5/26/2025
9.0.1-preview.7 259 5/13/2025
9.0.1-preview.6 406 5/9/2025
8.3.1-preview.1 195 12/24/2025
8.3.0 994 12/23/2025
8.2.0 508 9/24/2025
Loading failed