RepositoryKit 9.0.2

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

<div align="center"> <img src="logo-64x64.png" width="120" alt="RepositoryKit logo" />

RepositoryKit

Modular and Testable Repository Pattern Infrastructure for .NET 9+

</div>


🧭 Overview

RepositoryKit is a flexible, provider-agnostic repository pattern implementation. Designed for modern .NET 9+ projects, it encourages clean separation of concerns while supporting MongoDB, Entity Framework, and any other data provider.


🧩 Packages

Package Description
RepositoryKit.Core Interface contracts (IRepository, IQuery, IBulk)
RepositoryKit.EntityFramework EF Core implementation
RepositoryKit.MongoDB MongoDB driver implementation
RepositoryKit.Extensions LINQ extensions (pagination, sorting, chunking)

✨ Highlights

  • ✅ Plug-and-play support for multiple ORMs
  • 🧪 Fully mockable interfaces for unit testing
  • 🧱 Interface segregation: CRUD, Query, Bulk separated cleanly
  • ⚡ Minimal dependencies, blazing fast startup

🔧 Install

Install only the pieces you need:

# For EF Core:
dotnet add package RepositoryKit.EntityFramework

# For MongoDB:
dotnet add package RepositoryKit.MongoDB

# For base contracts (automatically included):
dotnet add package RepositoryKit.Core

🧰 Example Usage

// Register for EF
services.AddScoped(typeof(IRepository<,>), typeof(EFRepository<,>));

// Or register Mongo
services.AddScoped(typeof(IRepository<,>), typeof(MongoRepository<,>));

// Inject & use
public class ProductService
{
    private readonly IRepository<Product, Guid> _repo;

    public ProductService(IRepository<Product, Guid> repo)
    {
        _repo = repo;
    }

    public Task<Product?> Get(Guid id) => _repo.GetByIdAsync(id);
}

📦 NuGet


🧪 Testing

All interfaces can be mocked in unit tests. Full test suite is available under tests/.

dotnet test

📜 License

MIT © Ataberk Kaya

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.3 106 6/3/2025
9.0.2 126 6/1/2025

Unified release for RepositoryKit packages under .NET 9.0.0 compatibility.