Aicrosoft.DataAccess.Abstractions 8.0.0-beta.260130.2

This is a prerelease version of Aicrosoft.DataAccess.Abstractions.
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
                    
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="Aicrosoft.DataAccess.Abstractions" Version="8.0.0-beta.260130.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aicrosoft.DataAccess.Abstractions" Version="8.0.0-beta.260130.2" />
                    
Directory.Packages.props
<PackageReference Include="Aicrosoft.DataAccess.Abstractions" />
                    
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 Aicrosoft.DataAccess.Abstractions --version 8.0.0-beta.260130.2
                    
#r "nuget: Aicrosoft.DataAccess.Abstractions, 8.0.0-beta.260130.2"
                    
#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 Aicrosoft.DataAccess.Abstractions@8.0.0-beta.260130.2
                    
#: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=Aicrosoft.DataAccess.Abstractions&version=8.0.0-beta.260130.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Aicrosoft.DataAccess.Abstractions&version=8.0.0-beta.260130.2&prerelease
                    
Install as a Cake Tool

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

  1. Technological Decoupling: Provide high-level abstractions for repositories and units of work, allowing business logic to remain independent of specific database implementations.
  2. Architectural Consistency: Enforce the Repository and Unit of Work patterns across all data access components within the framework.
  3. Fine-Grained Access Control: Separate read and write operations into distinct interfaces (IReadRepository and IWriteRepository) to support optimized query patterns and clear intent.
  4. Standardized Data Models: Define common structures for entities, paging, and ordering to ensure consistent API contracts.
  5. 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, supporting IQueryable (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);
}
  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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