DKNet.EfCore.Abstractions 10.1.16

There is a newer version of this package available.
See the version list below for details.
dotnet add package DKNet.EfCore.Abstractions --version 10.1.16
                    
NuGet\Install-Package DKNet.EfCore.Abstractions -Version 10.1.16
                    
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="DKNet.EfCore.Abstractions" Version="10.1.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKNet.EfCore.Abstractions" Version="10.1.16" />
                    
Directory.Packages.props
<PackageReference Include="DKNet.EfCore.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 DKNet.EfCore.Abstractions --version 10.1.16
                    
#r "nuget: DKNet.EfCore.Abstractions, 10.1.16"
                    
#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 DKNet.EfCore.Abstractions@10.1.16
                    
#: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=DKNet.EfCore.Abstractions&version=10.1.16
                    
Install as a Cake Addin
#tool nuget:?package=DKNet.EfCore.Abstractions&version=10.1.16
                    
Install as a Cake Tool

DKNet.EfCore.Abstractions

NuGet NuGet Downloads

Persistence-technology-agnostic base classes, interfaces, and attributes shared by every DKNet EF Core package — entity identity, audit tracking, domain events, concurrency, and cross-cutting attributes for audit-log and sequence behavior. It has no dependency on Microsoft.EntityFrameworkCore itself, so domain projects can model entities without pulling in the full EF Core runtime.

Install

dotnet add package DKNet.EfCore.Abstractions

Features

  • IEntity<TKey> / Entity<TKey> / Entity — entity identity base classes (Guid-keyed Entity by default)
  • IEventEntity — per-entity domain event queue (AddEvent, AddEvent<TEvent>(), GetEvents, ClearEvents), implemented by Entity<TKey>
  • [RaisesEvent] / EventOperations — declare events raised automatically on Created/Updated/Deleted, with optional property narrowing
  • IAuditedProperties / IAuditedEntity<TKey> / AuditedEntity<TKey> / AuditedEntity — creation/modification tracking with SetCreatedBy/SetUpdatedBy
  • IConcurrencyEntity<TType> — optimistic concurrency via a RowVersion token
  • ISoftDeletableEntity — soft-delete contract (IsDeleted, DeletedOn, DeletedBy, Delete(...))
  • [Sequence] / [SqlSequence] — database-generated sequential values for fields and enum-backed SQL sequences
  • [AuditLog] / [IgnoreAuditLog] / [SensitiveDataAttribute] — audit-log opt-in and redaction markers (consumed by DKNet.EfCore.AuditLogs)
  • [IgnoreEntity] — marker to exclude a class from automatic entity mapping
  • IEventPublisher / DefaultEventPublisher / IEventItem / EventItem — the event-publishing contract consumed by DKNet.EfCore.Events

Quick start

using DKNet.EfCore.Abstractions.Entities;

public class Order : AuditedEntity // Guid-keyed, audit-tracked, event-capable
{
    private Order() { }

    public static Order Create(string createdBy)
    {
        var order = new Order();
        order.SetCreatedBy(createdBy);
        order.AddEvent(new OrderCreatedEvent(order.Id));
        return order;
    }

    public string Status { get; private set; } = "Pending";
}

public record OrderCreatedEvent(Guid OrderId);

Customisation reference

No options object and no DI registration — the customisation surface is the attributes and the interfaces.

[RaisesEvent] (AttributeTargets.Class, repeatable, not inherited) — three constructor forms: (Type eventType, EventOperations operations, params string[] properties), (string label, EventOperations operations, params string[] properties), and (EventOperations operations, params string[] properties).

Member Type Default Effect
EventType Type? null Type-naming form only; must be a [GenerateDto] record generated from the same entity.
Label string? null Label form only; one segment of the composed name. Never affects the payload's shape.
Operations EventOperations required Created = 1, Updated = 2, Deleted = 4, combinable. 0 is a build error.
Properties trailing params string[] empty Narrows an Updated rule to the listed direct properties. Empty means any change qualifies.
Exclude string[] [] Convention forms only; drops properties from the composed payload. Mutually exclusive with Include.
Include string[] [] Convention forms only; when non-empty it is the whole truth for the payload shape and overrides DtoGeneratorExclusions.

Convention-form names are composed in a fixed order: entity name, label (when given), narrowing properties (de-duplicated, ordinal-sorted), operations in the order Created, Updated, Deleted, then the suffix Event.

[Sequence] (AttributeTargets.Field — on an enum member):

Member Type Default Effect
Type (ctor arg) Type typeof(int) Only byte, short, int, long; anything else throws NotSupportedException.
Cyclic bool true Wrap back to the minimum after the maximum.
StartAt / IncrementsBy / Min / Max long / int / long / long -1 Applied only when greater than zero; otherwise the database default stands.
FormatString string? null Used by NextSeqValueWithFormat. {1} is the value; the literal token DateTime becomes {0} bound to DateTime.UtcNow.

[SqlSequence] (AttributeTargets.Enum): Schema (ctor arg) — string, default "seq".

Marker attributes with no properties: [AuditLog] (class or property), [IgnoreAuditLog] (class or property), [SensitiveData] (property), [IgnoreEntity] (class).

CRUD vertical-slice markers, consumed by DKNet.SlimBus.Generators: [CrudCreate] and [CrudUpdate] each expose Name (string?, default null); [CrudAction] adds route (ctor arg, string?, default null → the kebab-cased method name) and Verb (CrudActionVerb, default Post; Post/Put/Patch, no Delete).

Full feature walkthrough, configuration defaults, and how this package composes with DKNet.EfCore.Events/Hooks/AuditLogs/DataAuthorization/Encryption/DtoGenerator: docs/EfCore/DKNet.EfCore.Abstractions.md

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

Showing the top 4 NuGet packages that depend on DKNet.EfCore.Abstractions:

Package Downloads
DKNet.EfCore.Extensions

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

DKNet.EfCore.Events

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

DKNet.EfCore.Repos.Abstractions

Package Description

DKNet.EfCore.AuditLogs

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.19 0 9/3/2026
10.1.18 0 9/3/2026
10.1.17 0 9/3/2026
10.1.16 0 9/3/2026
10.1.15 119 9/1/2026
10.1.14 112 9/1/2026
10.1.13 132 8/31/2026
10.1.12 228 8/25/2026
10.1.11 184 8/24/2026
10.1.10 192 8/22/2026
10.1.9 198 8/22/2026
10.1.8 178 8/21/2026
10.1.7 202 8/21/2026
10.1.6 185 8/21/2026
10.1.5 269 8/20/2026
10.1.4 181 8/20/2026
10.1.3 191 8/19/2026
10.1.2 187 8/19/2026
10.1.1 169 8/19/2026
10.0.36 179 8/18/2026
Loading failed