CodeArchitects.Platform.Data 10.0.1

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

CodeArchitects.Platform.Data

NuGet License: Apache 2.0

The technology-agnostic Data Access Layer (DAL) abstractions for the Code Architects Platform. It defines the Repository and Unit of Work patterns independently of any ORM or database provider. Pick an implementation — Entity Framework Core, ADO.NET or MongoDB — to provide the concrete behavior.

Installation

dotnet add package CodeArchitects.Platform.Data

Repository pattern

The generic IRepository<TEntity, TKey> models CRUD access and is meant to be extended per entity:

public interface IRepository<TEntity, TKey>
    where TEntity : class
    where TKey : IEquatable<TKey>
{
    Task<TEntity?> FindAsync(TKey key, CancellationToken cancellationToken = default);
    Task<TEntity?> FindAsync(TKey key, IncludeAction<TEntity> includeAction, CancellationToken cancellationToken = default);
    Task InsertAsync(TEntity entity, CancellationToken cancellationToken = default);
    Task UpdateAsync(TEntity entity, CancellationToken cancellationToken = default);
    Task UpsertAsync(TEntity entity, CancellationToken cancellationToken = default);
    Task RemoveAsync(TEntity entity, CancellationToken cancellationToken = default);
    Task RemoveAsync(TKey key, CancellationToken cancellationToken = default);
}

Define a specialized repository for your aggregate:

public interface IProductRepository : IRepository<Product, Guid>
{
    Task<IEnumerable<Product>> GetTopSellingProductsAsync(int count, CancellationToken cancellationToken = default);
}

Unit of Work

Group multiple writes into a single atomic operation:

await using IUnitOfWork uow = _uowManager.Begin(autoSave: true, cancellationToken);
await _cartRepo.SetStatusToCompletedAsync(cart.Id, cancellationToken);
foreach (Product product in cart.Products)
    await _productRepo.IncrementSaleCountAsync(product.Id);
// committed automatically on scope exit when autoSave is true

IUnitOfWork can also be injected directly (registered as Scoped).

Also provides

  • IDataContext — generic, entity-typed CRUD used by repository base classes.
  • Aggregate associations (intra-/inter-aggregate reads and writes).
  • DataSeed / ISeeder — database seeding.

Implementations

License

Licensed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on CodeArchitects.Platform.Data:

Package Downloads
CodeArchitects.Platform.Data.AdoNet

Package Description

CodeArchitects.Platform.Data.EntityFrameworkCore

Package Description

CodeArchitects.Platform.Data.AutoMapper

Legacy AutoMapper integration for the Code Architects Platform, kept in maintenance mode for applications not yet migrated to CodeArchitects.Platform.Data.Mapster. New projects should use the Mapster integration. This package depends on AutoMapper 14.x, which is affected by advisory GHSA-rvv3-g6hj-g44x; the fix is only available in the commercial AutoMapper 15/16 majors, so it is not applied here. See SECURITY.md for the accepted-risk rationale.

CodeArchitects.Platform.Data.MongoDB

Package Description

CodeArchitects.Platform.Data.Mapster

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 490 7/14/2026