BB84.EntityFrameworkCore.Repositories.Abstractions 4.4.625

There is a newer version of this package available.
See the version list below for details.
dotnet add package BB84.EntityFrameworkCore.Repositories.Abstractions --version 4.4.625
                    
NuGet\Install-Package BB84.EntityFrameworkCore.Repositories.Abstractions -Version 4.4.625
                    
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="BB84.EntityFrameworkCore.Repositories.Abstractions" Version="4.4.625" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BB84.EntityFrameworkCore.Repositories.Abstractions" Version="4.4.625" />
                    
Directory.Packages.props
<PackageReference Include="BB84.EntityFrameworkCore.Repositories.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 BB84.EntityFrameworkCore.Repositories.Abstractions --version 4.4.625
                    
#r "nuget: BB84.EntityFrameworkCore.Repositories.Abstractions, 4.4.625"
                    
#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 BB84.EntityFrameworkCore.Repositories.Abstractions@4.4.625
                    
#: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=BB84.EntityFrameworkCore.Repositories.Abstractions&version=4.4.625
                    
Install as a Cake Addin
#tool nuget:?package=BB84.EntityFrameworkCore.Repositories.Abstractions&version=4.4.625
                    
Install as a Cake Tool

net80 net100 NuGet

BB84.EntityFrameworkCore.Repositories.Abstractions

This package provides the repository interface definitions and the IDbContext abstraction.

Installation

dotnet add package BB84.EntityFrameworkCore.Repositories.Abstractions

IDbContext

A thin abstraction over DbContext that exposes only what repositories need: Set<TEntity>(), SaveChanges, SaveChangesAsync, ChangeTracker, Database, and the save-events. Your application DbContext should implement this interface so repositories remain decoupled from the concrete EF context type.

public class AppDbContext : DbContext, IDbContext
{
    public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
    // DbSet properties ...
}

// DI registration
services.AddDbContext<AppDbContext>(...);
services.AddScoped<IDbContext>(sp => sp.GetRequiredService<AppDbContext>());

IGenericRepository<TEntity>

The base repository interface. All methods have synchronous and asynchronous variants.

Create

  • Create(entity) / Create(entities) — marks entity/entities as Added
  • CreateAsync(entity) / CreateAsync(entities)

Read

  • GetAll(ignoreQueryFilters, trackChanges) — returns all entities
  • GetAll<TResult>(selector, fieldSelector, ignoreQueryFilters) — returns projected DTO list
  • GetByCondition(expression, queryFilter, ignoreQueryFilters, trackChanges, includeProperties) — returns single or null
  • GetByCondition<TResult>(expression, selector, fieldSelector, ...) — projected single
  • GetManyByCondition(expression, queryFilter, ignoreQueryFilters, orderBy, skip, take, trackChanges, includeProperties) — paged/filtered list
  • GetManyByCondition<TResult>(...) — projected paged/filtered list
  • CountAll(ignoreQueryFilters) / CountByCondition(expression, ...) — count queries

Update

  • Update(entity) / Update(entities) — marks entity/entities as Modified
  • Update(expression, setPropertyCalls) — bulk ExecuteUpdate (bypasses change tracker)

Delete

  • Delete(entity) / Delete(entities) — marks entity/entities as Deleted
  • Delete(expression) — bulk ExecuteDelete (bypasses change tracker)

All Async variants accept an optional CancellationToken.

IIdentityRepository<TEntity, TKey> / IIdentityRepository<TEntity>

Extends IGenericRepository<TEntity> with ID-based operations. The non-generic overload defaults TKey to Guid.

Additional read methods

  • GetById(id, ignoreQueryFilters, trackChanges, includeProperties)
  • GetById<TResult>(id, selector, fieldSelector, ignoreQueryFilters) — projected
  • GetByIds(ids, ...) / GetByIdsAsync(ids, ...)

Additional delete methods

  • Delete(id) / Delete(ids) — bulk ExecuteDelete by key(s)

Additional update methods

  • Update(id, setPropertyCalls) / Update(ids, setPropertyCalls) — bulk ExecuteUpdate by key(s)

IEnumeratorRepository<TEntity, TKey> / IEnumeratorRepository<TEntity>

Extends IIdentityRepository with name-based lookups. The non-generic overload defaults TKey to int.

  • GetByName(name, ignoreQueryFilters, trackChanges)
  • GetByNames(names, ignoreQueryFilters, trackChanges)
  • Async variants of both

Usage

Define custom repository interfaces against these abstractions:

public interface IProductRepository : IIdentityRepository<Product>
{
    Task<IReadOnlyList<Product>> GetByCategoryAsync(int categoryId, CancellationToken token = default);
}

public interface ICategoryRepository : IEnumeratorRepository<ProductCategory>
{
    // GetByName / GetByNames already provided
}
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 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BB84.EntityFrameworkCore.Repositories.Abstractions:

Package Downloads
BB84.EntityFrameworkCore.Repositories

This package contains frequently used repository implementations of their respective abstractions, along with provider agnostic entity type configurations and save changes interceptors.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.1020 96 10/20/2026
5.0.916 382 9/16/2026
5.0.818 293 8/18/2026
4.5.725 223 7/25/2026
4.4.724 160 7/24/2026
4.4.625 252 6/25/2026
4.3.520 346 5/20/2026
4.3.513 209 5/13/2026
4.3.507 172 5/7/2026
4.3.419 263 4/19/2026
4.3.327 299 3/27/2026
4.2.322 198 3/22/2026
4.1.319 159 3/19/2026
4.1.222 244 2/22/2026
4.1.122 241 1/22/2026
4.0.1026 439 10/26/2025
4.0.916 506 9/16/2025
4.0.817 333 8/17/2025
3.1.617 435 6/17/2025
3.1.518 282 5/18/2025
Loading failed