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
<PackageReference Include="CodeArchitects.Platform.Data" Version="10.0.1" />
<PackageVersion Include="CodeArchitects.Platform.Data" Version="10.0.1" />
<PackageReference Include="CodeArchitects.Platform.Data" />
paket add CodeArchitects.Platform.Data --version 10.0.1
#r "nuget: CodeArchitects.Platform.Data, 10.0.1"
#:package CodeArchitects.Platform.Data@10.0.1
#addin nuget:?package=CodeArchitects.Platform.Data&version=10.0.1
#tool nuget:?package=CodeArchitects.Platform.Data&version=10.0.1
CodeArchitects.Platform.Data
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
CodeArchitects.Platform.Data.EntityFrameworkCoreCodeArchitects.Platform.Data.AdoNetCodeArchitects.Platform.Data.MongoDB
License
Licensed under the Apache License 2.0.
| Product | Versions 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. |
-
.NETStandard 2.1
- CodeArchitects.Platform.Common (>= 10.0.1)
- Microsoft.Bcl.AsyncInterfaces (>= 5.0.0)
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 |