Soenneker.Managers.Entities 4.0.1331

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Managers.Entities

An abstract CRUD manager that maps application entities to Cosmos DB documents.

Install

dotnet add package Soenneker.Managers.Entities

Usage

public interface IOrdersManager : IEntitiesManager<Order>
{
}

public sealed class OrdersManager : EntitiesManager<Order, OrderDocument>, IOrdersManager
{
    public OrdersManager(
        ICosmosRepository<OrderDocument> repository,
        IRedisUtil redis,
        ILogger<EntitiesManager<Order, OrderDocument>> logger,
        IUserContext userContext)
        : base(repository, redis, logger, userContext)
    {
    }
}

The entity and document types must expose compatible properties for AdaptViaReflection. Register the derived manager—normally scoped—and ensure the matching ICosmosRepository<TDocument> is registered.

Order created = await orders.Create(new Order { Name = "Sample" }, cancellationToken);
Order loaded = await orders.Get(created.Id, cancellationToken);
loaded.Name = "Updated";
await orders.Update(loaded, cancellationToken);
await orders.Delete(loaded.Id, cancellationToken);

What you get

  • IEntitiesManager<TEntity> — An abstract generic manager class provides CRUD operations for entities mapped to Cosmos DB documents.

API at a glance

API What it does Result / important behavior
IEntitiesManager<TEntity>.Create(entity, cancellationToken) Creates a new entity and stores it in the underlying data store. The created entity, with updated values such as generated ID.
IEntitiesManager<TEntity>.Get(id, cancellationToken) Retrieves a single entity by its identifier. The entity corresponding to the given ID.
IEntitiesManager<TEntity>.GetAll<TResponse>(options, cancellationToken) Retrieves documents and maps them to entities. A PagedResult<TEntity>; the base implementation only uses PageSize.
IEntitiesManager<TEntity>.Update(entity, cancellationToken) Updates an existing entity in the data store. The updated entity.
IEntitiesManager<TEntity>.Delete(id, cancellationToken) Deletes an entity from the data store by ID. A task representing the asynchronous operation.

Important behavior

  • IEntitiesManager<TEntity>.Get(id, cancellationToken): Thrown if the entity is not found.
  • IEntitiesManager<TEntity>.Update(entity, cancellationToken): Thrown if the entity to update is not found.
  • IEntitiesManager<TEntity>.Delete(id, cancellationToken): Thrown if the entity to delete is not found.

Practical notes

  • Create() assigns a new GUID as both document id and partition key, sets CreatedAt, and replaces the entity's Id with the repository result.
  • Update() sets ModifiedAt. Get(), Update(), and Delete() throw EntityNotFoundException when the id is absent.
  • The base GetAll<TResponse>() does not apply continuation tokens, ordering, search, filters, counts, or TResponse; override it when those semantics are required.
  • Caller cancellation is passed through to every Cosmos operation.
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
4.0.1371 30 9/11/2026
4.0.1370 53 9/10/2026
4.0.1369 41 9/10/2026
4.0.1368 48 9/9/2026
4.0.1367 45 9/9/2026
4.0.1366 39 9/9/2026
4.0.1365 50 9/9/2026
4.0.1363 50 9/9/2026
4.0.1362 46 9/9/2026
4.0.1361 44 9/9/2026
4.0.1360 41 9/8/2026
4.0.1359 47 9/8/2026
4.0.1358 51 9/8/2026
4.0.1357 83 9/8/2026
4.0.1355 84 9/8/2026
4.0.1354 89 9/8/2026
4.0.1352 87 9/8/2026
4.0.1351 87 9/8/2026
4.0.1350 89 9/7/2026
4.0.1331 91 9/4/2026
Loading failed

Updated Multiple NuGet packages