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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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.
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.
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)!);
}
VersionsCompatible and additional computed target framework versions.
.NET
net10.0net10.0 is compatible. net10.0-androidnet10.0-android was computed. net10.0-browsernet10.0-browser was computed. net10.0-iosnet10.0-ios was computed. net10.0-maccatalystnet10.0-maccatalyst was computed. net10.0-macosnet10.0-macos was computed. net10.0-tvosnet10.0-tvos was computed. net10.0-windowsnet10.0-windows was computed.