Cannery.Contracts 1.1.285

dotnet add package Cannery.Contracts --version 1.1.285
                    
NuGet\Install-Package Cannery.Contracts -Version 1.1.285
                    
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="Cannery.Contracts" Version="1.1.285" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cannery.Contracts" Version="1.1.285" />
                    
Directory.Packages.props
<PackageReference Include="Cannery.Contracts" />
                    
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 Cannery.Contracts --version 1.1.285
                    
#r "nuget: Cannery.Contracts, 1.1.285"
                    
#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 Cannery.Contracts@1.1.285
                    
#: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=Cannery.Contracts&version=1.1.285
                    
Install as a Cake Addin
#tool nuget:?package=Cannery.Contracts&version=1.1.285
                    
Install as a Cake Tool

Accessor Adapter Abstractions

Generic, composable interfaces and adapters for domain model access and capability delegation.

NuGet


Overview

This package provides a set of generic interfaces and adapters for building clean, testable, and decoupled access patterns to domain models and capabilities. It is designed for use in modular, DDD-inspired .NET solutions where you want to abstract away storage, workflow, or capability details behind simple, strongly-typed contracts.

  • Adapters: Define and compose CRUD, capability, and workflow operations.
  • Accessors: Provide delegating implementations for adapters.
  • No dependencies on infrastructure or HTTP concerns.
  • Ideal for use in Core.Domain, Core.Application, and above.

Key Interfaces

  • ICapabilityAdapter<TRequest, TResponse>
    For non-RESTful, task-oriented operations (e.g., workflows, batch jobs, MCP servers).

  • IModelAdapter<TKey, TModel, TCreateCommand, TModifyCommand>
    Full CRUD with PATCH-style modify semantics.

  • ICreateDeleteAdapter<TKey, TModel, TCreateCommand>
    For immutable models supporting only Create, Read, and Delete.

  • IReadable<TKey, TModel>
    Read operations, including paginated queries.

  • ICreatable<TModel, TCreateCommand>
    Create operations.

  • IModifiable<TKey, TModifyCommand>
    PATCH-style partial update operations.

  • IDeletable<TKey>
    Delete operations.


Example Usage

public class MyEntityAdapter : IModelAdapter<Guid, MyEntity, CreateMyEntityCommand, ModifyMyEntityCommand>
{
    // Implement all CRUD and patch methods here
}

You can also use the provided ModelAccessor and CapabilityAccessor classes to delegate to your adapters.


Why Use Accessor/Adapter Abstractions?

  • Testability: Easily mock or swap implementations for testing.
  • Separation of concerns: Keep domain/application logic decoupled from storage or workflow details.
  • Composability: Compose adapters for complex scenarios (e.g., aggregate roots, workflows).
  • Consistency: Enforce a uniform access pattern across your solution.

Installation

Add the NuGet package to your project:

dotnet add package [Your.Package.Name]

License

MIT


Contributing

Contributions and feedback are welcome! Please open issues or submit pull requests.

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.
  • net10.0

    • No dependencies.

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
1.1.285 0 6/12/2026
1.1.282 40 6/11/2026
1.1.280 83 6/9/2026
1.1.278 89 6/8/2026
1.1.276 85 6/7/2026
1.1.274 89 6/5/2026
1.1.272 94 6/1/2026
1.1.268 99 5/30/2026
1.1.266 102 5/29/2026
1.1.264 94 5/28/2026
1.1.262 105 5/26/2026
1.1.259 78 5/25/2026
1.1.257 77 5/25/2026
1.1.253 88 5/25/2026
1.1.251 94 5/23/2026
1.1.249 95 5/21/2026
1.1.247 94 5/21/2026
1.1.245 100 5/20/2026
1.1.243 98 5/19/2026
1.1.241 98 5/19/2026
Loading failed