Czlovek.MongoDb
3.0.0-beta.1
dotnet add package Czlovek.MongoDb --version 3.0.0-beta.1
NuGet\Install-Package Czlovek.MongoDb -Version 3.0.0-beta.1
<PackageReference Include="Czlovek.MongoDb" Version="3.0.0-beta.1" />
<PackageVersion Include="Czlovek.MongoDb" Version="3.0.0-beta.1" />
<PackageReference Include="Czlovek.MongoDb" />
paket add Czlovek.MongoDb --version 3.0.0-beta.1
#r "nuget: Czlovek.MongoDb, 3.0.0-beta.1"
#:package Czlovek.MongoDb@3.0.0-beta.1
#addin nuget:?package=Czlovek.MongoDb&version=3.0.0-beta.1&prerelease
#tool nuget:?package=Czlovek.MongoDb&version=3.0.0-beta.1&prerelease
MongoDb Client
A thin wrapper around the official MongoDB.Driver, resolving one or more named database connections from configuration and providing a generic repository base class.
Usage
Registration
services.AddMongoDb(configuration);
Configuration is read from the MongoDb section, keyed by connection name:
{
"MongoDb": {
"DefaultClient": {
"Host": "localhost",
"Port": 27017,
"User": "admin",
"Password": "",
"DatabaseName": "my-database"
}
}
}
This registers IMongoDbDefaultClient for the DefaultClient connection.
Defining a repository
Documents implement IMongoDbDocument (an ObjectId Id property), and repositories derive from MongoDbRepository<T>:
public class Order : IMongoDbDocument
{
public ObjectId Id { get; set; }
public string CustomerName { get; set; } = string.Empty;
}
public class OrderRepository(IMongoDbDefaultClient client)
: MongoDbRepository<Order>(client, "orders"), IOrderRepository;
MongoDbRepository<T> provides InsertAsync, InsertManyAsync, SelectAsync, AggregateAsync, UpsertAsync, UpsertManyAsync, SelectAndUpdateAsync and DeleteAsync, all accepting a CancellationToken.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Czlovek.Collections (>= 3.0.0-beta.1)
- Microsoft.EntityFrameworkCore (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- MongoDB.Driver (>= 3.10.0)
- Snappier (>= 1.3.1)
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 |
|---|---|---|
| 3.0.0-beta.1 | 43 | 7/19/2026 |
| 2.1.0-beta.85 | 69 | 6/16/2026 |
| 2.1.0-beta.84 | 60 | 5/7/2026 |
| 2.1.0-beta.83 | 58 | 5/7/2026 |
| 2.1.0-beta.82 | 111 | 3/20/2026 |
| 2.1.0-beta.81 | 76 | 2/21/2026 |
| 2.1.0-beta.80 | 78 | 2/21/2026 |
| 2.1.0-beta.79 | 77 | 2/13/2026 |
| 2.1.0-beta.78 | 88 | 2/11/2026 |
| 2.1.0-beta.77 | 75 | 2/11/2026 |
| 2.1.0-beta.76 | 74 | 2/10/2026 |
| 2.1.0-beta.75 | 82 | 2/10/2026 |
| 2.1.0-beta.74 | 82 | 1/28/2026 |
| 2.1.0-beta.73 | 205 | 11/6/2025 |
| 2.1.0-beta.72 | 175 | 11/6/2025 |
| 2.1.0-beta.71 | 186 | 11/4/2025 |
| 2.1.0-beta.70 | 181 | 11/4/2025 |
| 2.1.0-beta.69 | 185 | 11/4/2025 |
| 2.1.0-beta.68 | 191 | 11/4/2025 |
| 2.1.0-beta.67 | 190 | 11/2/2025 |