Rammi.MongoTypeRepository 10.0.7

dotnet add package Rammi.MongoTypeRepository --version 10.0.7
                    
NuGet\Install-Package Rammi.MongoTypeRepository -Version 10.0.7
                    
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="Rammi.MongoTypeRepository" Version="10.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rammi.MongoTypeRepository" Version="10.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Rammi.MongoTypeRepository" />
                    
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 Rammi.MongoTypeRepository --version 10.0.7
                    
#r "nuget: Rammi.MongoTypeRepository, 10.0.7"
                    
#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 Rammi.MongoTypeRepository@10.0.7
                    
#: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=Rammi.MongoTypeRepository&version=10.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Rammi.MongoTypeRepository&version=10.0.7
                    
Install as a Cake Tool

Rammi.MongoTypeRepository

A strongly typed repository library for MongoDB and Azure Cosmos DB, providing full async support with built-in connection throttling to prevent connection pool exhaustion.

Features

  • Strongly Typed: Provides strong types and repository access for MongoDB and Azure Cosmos DB
  • Full Async Support: All operations support async/await patterns
  • Connection Throttling: Built-in throttling prevents MongoWaitQueueFullException by limiting concurrent operations
  • Type Safety: Strong typing eliminates runtime errors from weak-typed MongoDB access
  • Easy to Use: Simple repository pattern implementation

Installation

Install via NuGet Package Manager:

dotnet add package Rammi.MongoTypeRepository

Or via Package Manager Console:

Install-Package Rammi.MongoTypeRepository

Quick Start

// Define your data model
public class Book : IMongoItem
{
    public ObjectId Id { get; set; }
    public string Title { get; set; }
    public string Author { get; set; }
}

// Create your repository
public class BooksRepository : TypeRepositoryBase<Book>
{
    public BooksRepository(IMongoDatabase database) : base(database, "books") { }
}

// Use it
var repository = new BooksRepository(mongoDatabase);
var books = await repository.GetAllAsync();

Why Use This Library?

MongoDB and Azure Cosmos DB are weakly typed, which can lead to runtime errors. This library provides:

  • Type Safety: Catch errors at compile time instead of runtime
  • Connection Management: Prevents connection pool exhaustion with automatic throttling
  • Clean Code: Repository pattern keeps your code organized and testable

Documentation

For complete documentation, examples, and source code, visit:

License

This project is licensed under the MIT License.

Author

Jiri Hernik

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
10.0.7 683 12/3/2025
10.0.6 665 12/3/2025
10.0.5 667 12/3/2025
10.0.4 667 12/3/2025
10.0.3 424 11/18/2025
10.0.2 408 11/18/2025
10.0.1 410 11/18/2025
6.0.0 452 3/9/2023
1.3.2 1,021 2/7/2020
1.3.1 884 1/30/2020
1.3.0 861 1/30/2020
1.2.1 1,465 8/7/2018
1.2.0 1,326 10/17/2017
1.2.0-alpha 1,153 8/8/2017
1.0.1 1,325 8/4/2017
1.0.0 2,719 12/19/2016

- Updated MongoDB.Driver to 3.5.2