DotEmilu.Abstractions 10.0.0

Prefix Reserved
dotnet add package DotEmilu.Abstractions --version 10.0.0
                    
NuGet\Install-Package DotEmilu.Abstractions -Version 10.0.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="DotEmilu.Abstractions" Version="10.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotEmilu.Abstractions" Version="10.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DotEmilu.Abstractions" />
                    
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 DotEmilu.Abstractions --version 10.0.0
                    
#r "nuget: DotEmilu.Abstractions, 10.0.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 DotEmilu.Abstractions@10.0.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=DotEmilu.Abstractions&version=10.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DotEmilu.Abstractions&version=10.0.0
                    
Install as a Cake Tool

DotEmilu.Abstractions

NuGet License: MIT

Core interfaces and base classes for the DotEmilu ecosystem. This package has no dependency on DI containers or ASP.NET Core — it defines the contracts that all other DotEmilu packages build upon.

Install

dotnet add package DotEmilu.Abstractions

What's included

Handler contracts

Interface Purpose
IHandler<TRequest> Handles a request with no return value
IHandler<TRequest, TResponse> Handles a request and returns a typed response
IHandler Parameterless handler (e.g., seed data, scheduled tasks)

Request contracts

Interface Purpose
IRequest Marker for requests with no response
IRequest<TResponse> Marker for requests that produce a response
IBaseRequest Base marker interface for all requests

Validation

Type Purpose
IVerifier<TRequest> Validates a request and accumulates ValidationFailure errors
IVerifier Base interface exposing ValidationErrors, IsValid, AddValidationError(), AddValidationErrors()

Base entities

Type Purpose
IBaseEntity Soft-delete contract (IsDeleted)
IBaseEntity<TKey> Adds a struct-typed Id primary key
BaseEntity<TKey> Abstract class implementing IBaseEntity<TKey>
IBaseAuditableEntity<TUserKey> Audit fields: Created, CreatedBy, LastModified, LastModifiedBy, Deleted, DeletedBy
IBaseAuditableEntity<TKey, TUserKey> Combines IBaseEntity<TKey> + IBaseAuditableEntity<TUserKey>
BaseAuditableEntity<TUserKey> Abstract class with audit fields (no primary key)
BaseAuditableEntity<TKey, TUserKey> Abstract class with primary key + audit fields

Utilities

Type Purpose
PaginatedList<T> Paginated collection with Items, PageNumber, TotalPages, TotalCount, HasPreviousPage, HasNextPage
IContextUser<TUserKey> Contract to expose the current user's Id (used by auditable interceptors)

Usage

// Define a request with no response
public record CreateInvoiceRequest(string Number, decimal Amount) : IRequest;

// Define a request with a typed response
public record GetInvoiceByIdRequest(int Id) : IRequest<InvoiceResponse>;
public record InvoiceResponse(int Id, string Number, decimal Amount);

// Define an auditable entity
public class Invoice : BaseAuditableEntity<int, Guid>
{
    public string Number { get; set; } = default!;
    public decimal Amount { get; set; }
}

// Expose current user identity
public class CurrentUser(IHttpContextAccessor accessor) : IContextUser<Guid>
{
    public Guid Id => Guid.Parse(accessor.HttpContext!.User.FindFirstValue(ClaimTypes.NameIdentifier)!);
}

Additional documentation

Part of the DotEmilu ecosystem

Package Description
DotEmilu.Abstractions (this) Core interfaces and base classes
DotEmilu Handler pipeline with FluentValidation
DotEmilu.AspNetCore ASP.NET Core Minimal API integration
DotEmilu.EntityFrameworkCore EF Core interceptors and configurations

Feedback

File bugs, feature requests, or questions on GitHub Issues.

Full documentation & source

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 (2)

Showing the top 2 NuGet packages that depend on DotEmilu.Abstractions:

Package Downloads
DotEmilu.EntityFrameworkCore

EF Core building blocks for DotEmilu: auditable interceptors, soft-delete, entity configurations with mapping strategies, and pagination extensions.

DotEmilu

Handler pipeline with automatic FluentValidation, lifecycle hooks, chain-of-responsibility, and assembly-scanning DI registration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0 136 4/3/2026
2.0.0 315 3/31/2025