RepositoryKit.EntityFramework
9.0.2
See the version list below for details.
dotnet add package RepositoryKit.EntityFramework --version 9.0.2
NuGet\Install-Package RepositoryKit.EntityFramework -Version 9.0.2
<PackageReference Include="RepositoryKit.EntityFramework" Version="9.0.2" />
<PackageVersion Include="RepositoryKit.EntityFramework" Version="9.0.2" />
<PackageReference Include="RepositoryKit.EntityFramework" />
paket add RepositoryKit.EntityFramework --version 9.0.2
#r "nuget: RepositoryKit.EntityFramework, 9.0.2"
#addin nuget:?package=RepositoryKit.EntityFramework&version=9.0.2
#tool nuget:?package=RepositoryKit.EntityFramework&version=9.0.2
<div align="center"> <img src="logo-64x64.png" width="120" alt="RepositoryKit logo" />
RepositoryKit.EntityFramework
Entity Framework Core Implementation for RepositoryKit
</div>
π¦ Package
Provides an out-of-the-box repository implementation using Entity Framework Core. Supports DbContext
, DbSet<T>
and leverages EF Coreβs change tracking.
β¨ Features
EFRepository<T, TKey>
implements all core contractsAsNoTracking
support for queries- Async support for all operations
- Supports pagination, sorting, and filtered queries
π§° Usage
services.AddDbContext<AppDbContext>();
// Register EFRepository with open generics (recommended)
services.AddScoped(typeof(IRepository<,>), typeof(EFRepository<,>));
// Optional: You can still register specific types manually if needed
// services.AddScoped<IRepository<Product, Guid>>(provider =>
// new EFRepository<Product, Guid>(provider.GetRequiredService<AppDbContext>()));
π Example
// Define your entity
public class Product
{
public Guid Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
}
// Inject the repository (e.g. in controller or service)
private readonly IRepository<Product, Guid> _repo;
public ProductService(IRepository<Product, Guid> repo)
{
_repo = repo;
}
// Use it
var product = await _repo.GetByIdAsync(id);
var expensive = await _repo.FindAsync(p => p.Price > 100, tracking: false);
π Requirements
- Microsoft.EntityFrameworkCore
- Compatible with .NET 9+
π License
MIT Β© Ataberk Kaya
π This package depends on `RepositoryKit.Core
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- Microsoft.EntityFrameworkCore (>= 8.0.16)
- RepositoryKit.Core (>= 9.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on RepositoryKit.EntityFramework:
Package | Downloads |
---|---|
RepositoryKit
Umbrella package for RepositoryKit - a modular repository pattern infrastructure that supports EF Core, MongoDB and clean LINQ extensions. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial stable version for EF Core repositories using .NET 9 compatible structure.