BB84.EntityFrameworkCore is a .NET 10.0 library collection that provides a reusable repository pattern implementation for Entity Framework Core applications. It ships as five focused NuGet packages that can be adopted incrementally.
| Package | Description |
|---|---|
| BB84.EntityFrameworkCore.Entities.Abstractions | Core entity interface definitions — no dependencies |
| BB84.EntityFrameworkCore.Entities | Default implementations of the entity abstractions |
| BB84.EntityFrameworkCore.Repositories.Abstractions | Repository interface definitions |
| BB84.EntityFrameworkCore.Repositories | Repository implementations, provider-agnostic configurations and interceptors |
| BB84.EntityFrameworkCore.Repositories.SqlServer | SQL Server configuration tuning, column type extensions and DatabaseFacadeExtensions |
dotnet add package BB84.EntityFrameworkCore.Entities.Abstractions
dotnet add package BB84.EntityFrameworkCore.Entities
dotnet add package BB84.EntityFrameworkCore.Repositories.Abstractions
dotnet add package BB84.EntityFrameworkCore.Repositories
dotnet add package BB84.EntityFrameworkCore.Repositories.SqlServer# Build the solution
dotnet build
# Run all tests
dotnet testThe tests are split by what they need. The entity tests and the provider-agnostic repository tests run on SQLite in memory and need nothing installed — together they take a couple of seconds:
dotnet test tests/BB84.EntityFrameworkCore.Entities.Tests
dotnet test tests/BB84.EntityFrameworkCore.Repositories.Agnostic.TestsOnly BB84.EntityFrameworkCore.Repositories.Tests needs Docker. It starts a SQL Server container
through Testcontainers and covers what genuinely requires SQL
Server: temporal tables, rowversion concurrency, the T-SQL emitting extensions and the provider
column types. On Apple silicon that image runs under emulation, which works but is noticeably
slower.
The agnostic suite deliberately does not reference the SqlServer package, so a provider-specific
call leaking into BB84.EntityFrameworkCore.Repositories is a compile error rather than a
surprise on another database.
BB84.EntityFrameworkCore/
├── src/
│ ├── BB84.EntityFrameworkCore.Entities.Abstractions/ # Entity interface definitions
│ ├── BB84.EntityFrameworkCore.Entities/ # Entity implementations
│ ├── BB84.EntityFrameworkCore.Repositories.Abstractions/ # Repository interface definitions
│ ├── BB84.EntityFrameworkCore.Repositories/ # Repository implementations
│ └── BB84.EntityFrameworkCore.Repositories.SqlServer/ # SQL Server configurations and extensions
├── tests/
│ ├── BB84.EntityFrameworkCore.Entities.Tests/ # Entity unit tests
│ ├── BB84.EntityFrameworkCore.TestSupport.Tests/ # Test model shared by both repository suites
│ ├── BB84.EntityFrameworkCore.Repositories.Agnostic.Tests/ # Provider-agnostic tests (SQLite in memory)
│ └── BB84.EntityFrameworkCore.Repositories.Tests/ # SQL Server tests (requires Docker)
└── docs/ # DocFX documentation source
- Fork the repository and create a feature branch from
main. - Follow the existing code style (see
.editorconfig). - Add XML documentation for all public APIs.
- Add unit tests for every new method.
- Ensure all tests pass.
- Open a pull request describing your changes.
Complete API reference: https://bobobass84.github.io/BB84.EntityFrameworkCore
To build the documentation locally:
dotnet tool install -g docfx
docfx docs/docfx.json --serveThis project is licensed under the MIT License — see the LICENSE file for details.