Aicrosoft.DataAccess.Abstractions
8.0.0-beta.260130.2
dotnet add package Aicrosoft.DataAccess.Abstractions --version 8.0.0-beta.260130.2
NuGet\Install-Package Aicrosoft.DataAccess.Abstractions -Version 8.0.0-beta.260130.2
<PackageReference Include="Aicrosoft.DataAccess.Abstractions" Version="8.0.0-beta.260130.2" />
<PackageVersion Include="Aicrosoft.DataAccess.Abstractions" Version="8.0.0-beta.260130.2" />
<PackageReference Include="Aicrosoft.DataAccess.Abstractions" />
paket add Aicrosoft.DataAccess.Abstractions --version 8.0.0-beta.260130.2
#r "nuget: Aicrosoft.DataAccess.Abstractions, 8.0.0-beta.260130.2"
#:package Aicrosoft.DataAccess.Abstractions@8.0.0-beta.260130.2
#addin nuget:?package=Aicrosoft.DataAccess.Abstractions&version=8.0.0-beta.260130.2&prerelease
#tool nuget:?package=Aicrosoft.DataAccess.Abstractions&version=8.0.0-beta.260130.2&prerelease
Aicrosoft.DataAccess.Abstractions
Aicrosoft.DataAccess.Abstractions is the foundational library for the data access layer in the Aicrosoft framework. It defines the core interfaces and models used across various data providers (such as Entity Framework Core, Azure Table Storage, etc.), ensuring a consistent architectural pattern and decoupling business logic from concrete data technologies.
Design Goals
- Technological Decoupling: Provide high-level abstractions for repositories and units of work, allowing business logic to remain independent of specific database implementations.
- Architectural Consistency: Enforce the Repository and Unit of Work patterns across all data access components within the framework.
- Fine-Grained Access Control: Separate read and write operations into distinct interfaces (
IReadRepositoryandIWriteRepository) to support optimized query patterns and clear intent. - Standardized Data Models: Define common structures for entities, paging, and ordering to ensure consistent API contracts.
- Extensibility and Resilience: Provide interfaces for connection string resolution and standardized exception handling for data-related errors.
Key Abstractions
IRepository<TEntity, TKey>: The primary generic interface for data access, combining read, write, and common operations.IReadRepository<TEntity, TKey>: Optimized for read-only operations, supportingIQueryable(typically with tracking disabled) and raw SQL execution.IUnitOfWork: Manages transactions and atomic commits across multiple repository operations.IEntity<TKey>&Entity<TKey>: Standardized base for domain entities, including primary key support.PagedRecord<T>: A unified response model for paginated data, including metadata like current page, page size, and total count.IPagingRepository: Specifically designed for paginated queries with complex ordering requirements.IConnectionStringResolver: Allows for dynamic and environment-aware connection string management.
Usage
Since this is an abstractions library, it is primarily used as a dependency in business projects (to reference interfaces) and data projects (to implement them).
1. Defining a Domain Entity
using Aicrosoft.DataAccess.Data;
public class Book : Entity<int>
{
public string Title { get; set; }
public string Author { get; set; }
}
2. Using Repositories in Business Services
By relying on IRepository instead of a concrete DbContext, your services remain testable and database-agnostic.
using Aicrosoft.DataAccess.Repositories;
public class BookService
{
private readonly IRepository<Book, int> _repository;
public BookService(IRepository<Book, int> repository)
{
_repository = repository;
}
public async Task<Book?> GetBook(int id)
{
// IReadRepository provides access to Queryable or Get
return await _repository.GetFastQueryable()
.FirstOrDefaultAsync(x => x.Id == id);
}
}
3. Handling Paginated Results
using Aicrosoft.DataAccess.Data;
public async Task<PagedRecord<Book>> GetBooksPage(int pageIndex, int pageSize)
{
// The framework provides extension methods to project IQueryable to PagedRecord
return await _repository.GetFastQueryable()
.ToPageAsync(pageIndex, pageSize);
}
Related Projects
Aicrosoft.DataAccess.EntityFrameworkCore: Concrete implementation of these abstractions for EF Core.Aicrosoft.DataAccess.AzureTable: Concrete implementation for Azure Table Storage.Aicrosoft.Extensions.Hosting: Used for host-based dependency injection integration.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- Aicrosoft.Extensions (>= 8.0.0-beta.260130.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Aicrosoft.DataAccess.Abstractions:
| Package | Downloads |
|---|---|
|
Aicrosoft.DataAccess.EntityFrameworkCore
Package Description |
|
|
Aicrosoft.DataAccess.AzureTable
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0-beta.260130.2 | 89 | 1/30/2026 |
| 8.0.0-beta.260127.1 | 80 | 1/27/2026 |
| 8.0.0-beta.251110.1 | 219 | 11/10/2025 |