Soenneker.Managers.Entities 4.0.1347

Prefix Reserved
dotnet add package Soenneker.Managers.Entities --version 4.0.1347
                    
NuGet\Install-Package Soenneker.Managers.Entities -Version 4.0.1347
                    
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.1347" />
                    
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.1347" />
                    
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.1347
                    
#r "nuget: Soenneker.Managers.Entities, 4.0.1347"
                    
#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.1347
                    
#: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.1347
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Managers.Entities&version=4.0.1347
                    
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.1347 0 9/7/2026
4.0.1346 59 9/6/2026
4.0.1345 54 9/6/2026
4.0.1344 37 9/6/2026
4.0.1343 42 9/5/2026
4.0.1342 49 9/5/2026
4.0.1341 50 9/5/2026
4.0.1340 38 9/5/2026
4.0.1339 41 9/5/2026
4.0.1338 48 9/5/2026
4.0.1336 100 9/5/2026
4.0.1334 40 9/4/2026
4.0.1332 45 9/4/2026
4.0.1331 43 9/4/2026
4.0.1330 44 9/4/2026
4.0.1329 51 9/4/2026
4.0.1327 39 9/4/2026
4.0.1326 47 9/4/2026
4.0.1325 50 9/4/2026
4.0.1323 47 9/3/2026
Loading failed

Updated Multiple NuGet packages