Xpandables.Entities
10.0.2
dotnet add package Xpandables.Entities --version 10.0.2
NuGet\Install-Package Xpandables.Entities -Version 10.0.2
<PackageReference Include="Xpandables.Entities" Version="10.0.2" />
<PackageVersion Include="Xpandables.Entities" Version="10.0.2" />
<PackageReference Include="Xpandables.Entities" />
paket add Xpandables.Entities --version 10.0.2
#r "nuget: Xpandables.Entities, 10.0.2"
#:package Xpandables.Entities@10.0.2
#addin nuget:?package=Xpandables.Entities&version=10.0.2
#tool nuget:?package=Xpandables.Entities&version=10.0.2
System.Entities
Entity abstractions, repository pattern, and unit-of-work contracts for domain-driven persistence.
📖 Overview
System.Entities (NuGet: Xpandables.Entities) defines IEntity<TKey> for domain entities with lifecycle metadata, IEntityRepository<TEntity> for async CRUD with query specifications, and IEntityUnitOfWork for transactional persistence. Namespace: System.Entities.
Built for .NET 10 and C# 14.
✨ Features
🏷️ Entity
| Type | File | Description |
|---|---|---|
IEntity |
IEntity.cs |
Base — KeyId, Status, CreatedOn, UpdatedOn, DeletedOn, IsDeleted |
IEntity<TKey> |
IEntity.cs |
Strongly-typed key (TKey : notnull, IComparable) |
Entity |
Entity.cs |
Abstract base implementation |
EntityStatus |
EntityStatus.cs |
Status constants |
📦 Repository
| Type | File | Description |
|---|---|---|
IEntityRepository |
IEntityRepository.cs |
Marker (IDisposable, IAsyncDisposable) |
IEntityRepository<TEntity> |
IEntityRepository.cs |
FetchAsync, FetchSingleAsync, FetchSingleOrDefaultAsync, InsertAsync, UpdateAsync, DeleteAsync |
🔍 Query Specification
| Type | File | Description |
|---|---|---|
IQuerySpecification<TEntity, TResult> |
IQuerySpecification.cs |
Defines filtering, projection, ordering, paging |
QuerySpecification |
QuerySpecification.cs |
Fluent builder via QuerySpecification.For<TEntity>() |
🔄 Unit of Work
| Type | File | Description |
|---|---|---|
IEntityUnitOfWork |
IEntityUnitOfWork.cs |
SaveChangesAsync contract |
IEntityUnitOfWorkTransaction |
IEntityUnitOfWorkTransaction.cs |
Transaction abstraction |
EntityUnitOfWorkDbTransaction |
EntityUnitOfWorkDbTransaction.cs |
Database transaction wrapper |
IEntityRequiresUnitOfWork |
IEntityRequiresUnitOfWork.cs |
Marker for requests needing EF transactions |
🛠️ Utilities
| Type | File | Description |
|---|---|---|
EntityUpdater |
EntityUpdater.cs |
Bulk update builder |
IEntityPropertyUpdate |
IEntityPropertyUpdate.cs |
Property update abstraction |
IAmbientContextReceiver |
IAmbientContextReceiver.cs |
Ambient context injection |
📦 Installation
dotnet add package Xpandables.Entities
Project References: Xpandables.AsyncPaged
🚀 Quick Start
using System.Entities;
// Fetch with specification
var spec = QuerySpecification.For<User>()
.Where(u => u.IsActive)
.OrderBy(u => u.Name)
.Take(10)
.Select(u => new UserDto(u.Id, u.Name));
var users = repository.FetchAsync(spec, ct);
await foreach (var user in users) { /* ... */ }
📄 License
Apache License 2.0 — Copyright © Kamersoft 2025
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.5)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.5)
- Microsoft.Extensions.Configuration.Json (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
- Microsoft.Extensions.Primitives (>= 10.0.5)
- Xpandables.AsyncPaged (>= 10.0.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Xpandables.Entities:
| Package | Downloads |
|---|---|
|
Xpandables.Results.Pipelines
Pipeline pattern implementation. |
|
|
Xpandables.Entities.EntityFramework
IRepository EntityFramework implementation. |
GitHub repositories
This package is not used by any popular GitHub repositories.