RepositoryKit 9.0.3
dotnet add package RepositoryKit --version 9.0.3
NuGet\Install-Package RepositoryKit -Version 9.0.3
<PackageReference Include="RepositoryKit" Version="9.0.3" />
<PackageVersion Include="RepositoryKit" Version="9.0.3" />
<PackageReference Include="RepositoryKit" />
paket add RepositoryKit --version 9.0.3
#r "nuget: RepositoryKit, 9.0.3"
#addin nuget:?package=RepositoryKit&version=9.0.3
#tool nuget:?package=RepositoryKit&version=9.0.3
<div align="center"> <img src="logo-64x64.png" width="120" alt="RepositoryKit logo" />
RepositoryKit
Unified Repository and UnitOfWork Abstractions for Modern .NET
</div>
🚀 What is RepositoryKit?
RepositoryKit is a modular, provider-agnostic infrastructure library
that gives you clean, consistent repository and unit-of-work patterns for .NET projects.
With a single abstraction layer, you can swap between Entity Framework, MongoDB, or any custom provider
— with no changes to your application or domain logic.
🧩 Packages
Package | Purpose |
---|---|
RepositoryKit.Core |
Provider-agnostic interfaces and abstractions |
RepositoryKit.EntityFramework |
Plug-and-play EF Core implementation |
RepositoryKit.MongoDb |
Plug-and-play MongoDB implementation |
RepositoryKit.Extensions |
Handy LINQ/collection extensions for any repository |
🛠️ Why RepositoryKit?
- Write once, use anywhere: Keep your app logic independent from data provider details.
- Easily mockable & testable: Interfaces are designed for clean dependency injection.
- Flexible: Add new providers or swap databases with minimal refactoring.
- Production-ready patterns: Follow real-world repository/unit-of-work design.
- Extensible: Use with your own custom repositories or add domain logic.
📦 Quick Example
Register in your DI container (e.g., Entity Framework):
builder.Services.AddDbContext<AppDbContext>(options => ...);
builder.Services.AddScoped<IUnitOfWork<AppDbContext>, EfUnitOfWork<AppDbContext>>();
builder.Services.AddSingleton<IUnitOfWorkManager, EfUnitOfWorkManager>();
Use in your minimal API or service:
app.MapGet("/products", async (IUnitOfWork<AppDbContext> uow) =>
{
var repo = uow.GetRepository<Product>();
var products = await repo.GetAllAsync();
return Results.Ok(products);
});
📚 Providers
- EF Core: RepositoryKit.EntityFramework
- MongoDB: RepositoryKit.MongoDb
- Extensions: RepositoryKit.Extensions for LINQ magic (Shuffle, SafeDistinct, GroupBySelect...)
📜 License
MIT © Ataberk Kaya
🤝 Dependencies
- .NET 8+
- Minimal dependencies, designed for plug-and-play usage
📎 RepositoryKit
is an open, modular infrastructure for all .NET repository scenarios.
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
- RepositoryKit.Core (>= 9.0.3)
- RepositoryKit.EntityFramework (>= 9.0.3)
- RepositoryKit.Extensions (>= 9.0.3)
- RepositoryKit.MongoDB (>= 9.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Unified release for RepositoryKit packages under .NET 9.0.0 compatibility.