Robotico.Repository 1.2.2

Robotico.Repository

.NET 8 .NET 10 GitHub Packages Build

Reference Robotico.Repository when you use the Repository pattern (Repository + Unit of Work). Interfaces: IRepository<TEntity,TId> and IAsyncRepository<TEntity,TId> (uses Robotico.Domain IEntity<TId>), IUnitOfWork (CommitAsync returns Result), IUnitOfWorkCapabilities / UnitOfWorkProfile, and UnitOfWorkGuard / UnitOfWorkRequirement for startup validation. Entity types come from Robotico.Domain (e.g. Entity<TId>).

Which interface?

Host / scenario Prefer
New ASP.NET Core or background worker code IAsyncRepository<TEntity,TId> when your Tier 3 adapter implements it
Legacy modules, scripts, or purely synchronous flows IRepository<TEntity,TId>

Migration: csharp/build/ROBOTICO_REPOSITORY_ASYNC_MIGRATION.adoc in the Robotico workspace.

Robotico dependencies

flowchart LR
  A[Robotico.Repository] --> B[Robotico.Domain]
  A --> C[Robotico.Result]
Package Use with Repository
Robotico.Domain Required: entities implement IEntity<TId> and can extend Entity<TId>.
Robotico.Option TryGetById(id) returning Option<TEntity> for "maybe present" semantics; clearer than overloading Result for "not found".
Robotico.Specification Query by criteria: use ISpecification<TEntity> for Find-style operations.
Robotico.Validation Validate entities before Add/Update (e.g. IValidator<TEntity>).

Quick start

Define an entity (using Robotico.Domain) and inject IRepository and IUnitOfWork:

public sealed class Order : Entity<Guid> { public Order(Guid id) : base(id) { } }

// In your application code:
Result addResult = _repository.Add(order);
if (addResult.IsError(out _)) { /* handle */ }
Result commitResult = await _unitOfWork.CommitAsync(cancellationToken);

GetById returns a failed result when the entity is not found. See docs/design.adoc for design and related packages.

Installation

dotnet add package Robotico.Repository

Building and testing

dotnet restore
dotnet build -c Release
dotnet test -c Release --verbosity normal

With coverage (Coverlet):

dotnet test -c Release --collect:"XPlat Code Coverage" --results-directory ./coverage

CI enforces 90% line coverage (or passes when the library has no executable lines) and runs a trim-validate build. Versioning: SemVer.

License

See repository license file.

Showing the top 20 packages that depend on Robotico.Repository.

Packages Downloads
Robotico.Repository.MishimaDb
IRepository and IUnitOfWork backed by MishimaDb using document-on-row storage (primary key + JSON payload). MishimaDbUnitOfWork coordinates a real MishimaWriteTransaction commit; pass WriteTransaction to repositories for atomic multi-write scopes.
5
Robotico.Repository.MongoDb
IRepository and IUnitOfWork backed by MongoDB.Driver using IMongoCollection and optional IClientSessionHandle. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, MongoDB.Driver.
3
Robotico.Repository.MishimaDocs
IRepository, IAsyncRepository, and IUnitOfWork backed by MishimaDocs (embedded document store). Each repository operation commits immediately when using sync collections; async writes use IMishimaAsyncCollection when the database supports async persistence. MishimaDocsUnitOfWork.CommitAsync is a no-op success for API parity; IUnitOfWorkCapabilities describes semantics.
3
Robotico.Repository.MishimaDb
IRepository and IUnitOfWork backed by MishimaDb using document-on-row storage (primary key + JSON payload). MishimaDbUnitOfWork coordinates a real MishimaWriteTransaction commit; pass WriteTransaction to repositories for atomic multi-write scopes.
3
Robotico.Repository.EntityFrameworkCore
IRepository and IUnitOfWork backed by EF Core (provider-agnostic). App adds Npgsql/SqlServer/Sqlite etc. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, Microsoft.EntityFrameworkCore.
3
Robotico.Repository.InMemory
In-memory IRepository and IUnitOfWork for tests and prototyping. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result.
3
Robotico.Repository.EntityFrameworkCore
IRepository and IUnitOfWork backed by EF Core (provider-agnostic). App adds Npgsql/SqlServer/Sqlite etc. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, Microsoft.EntityFrameworkCore.
2
Robotico.Repository.InMemory
In-memory IRepository and IUnitOfWork for tests and prototyping. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result.
2
Robotico.Repository.MishimaDocs
IRepository, IAsyncRepository, and IUnitOfWork backed by MishimaDocs (embedded document store). Each repository operation commits immediately when using sync collections; async writes use IMishimaAsyncCollection when the database supports async persistence. MishimaDocsUnitOfWork.CommitAsync is a no-op success for API parity; IUnitOfWorkCapabilities describes semantics.
2
Robotico.Repository.MishimaDb
IRepository and IUnitOfWork backed by MishimaDb using document-on-row storage (primary key + JSON payload). MishimaDbUnitOfWork coordinates a real MishimaWriteTransaction commit; pass WriteTransaction to repositories for atomic multi-write scopes.
2
Robotico.Repository.CosmosDb
IRepository and IUnitOfWork backed by Microsoft.Azure.Cosmos. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, Microsoft.Azure.Cosmos.
2
Robotico.Repository.Dapper
IRepository and IUnitOfWork over IDbConnection (Dapper/raw SQL). Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, Dapper.
2
Robotico.Repository.MishimaDocs
IRepository, IAsyncRepository, and IUnitOfWork backed by MishimaDocs (embedded document store). Each repository operation commits immediately when using sync collections; async writes use IMishimaAsyncCollection when the database supports async persistence. MishimaDocsUnitOfWork.CommitAsync is a no-op success for API parity; IUnitOfWorkCapabilities describes semantics.
1
Robotico.Repository.MongoDb
IRepository and IUnitOfWork backed by MongoDB.Driver using IMongoCollection and optional IClientSessionHandle. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, MongoDB.Driver.
1
Robotico.Repository.CosmosDb
IRepository and IUnitOfWork backed by Microsoft.Azure.Cosmos. Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, Microsoft.Azure.Cosmos.
0
Robotico.Repository.Dapper
IRepository and IUnitOfWork over IDbConnection (Dapper/raw SQL). Depends on Robotico.Repository, Robotico.Domain, Robotico.Result, Dapper.
0

.NET 8.0

.NET 10.0

Version Downloads Last updated
1.2.3 4 07/26/2026
1.2.2 9 06/03/2026