BrandUp.MongoDB
10.0.1
dotnet add package BrandUp.MongoDB --version 10.0.1
NuGet\Install-Package BrandUp.MongoDB -Version 10.0.1
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="BrandUp.MongoDB" Version="10.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BrandUp.MongoDB" Version="10.0.1" />
<PackageReference Include="BrandUp.MongoDB" />
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 BrandUp.MongoDB --version 10.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BrandUp.MongoDB, 10.0.1"
#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 BrandUp.MongoDB@10.0.1
#: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=BrandUp.MongoDB&version=10.0.1
#tool nuget:?package=BrandUp.MongoDB&version=10.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BrandUp.MongoDB
Installation
NuGet-package: https://www.nuget.org/packages/BrandUp.MongoDB/
Configuration
public class WebSiteDbContext : MongoDbContext, ICommentsDbContext
{
public IMongoCollection<ArticleDocument> Articles => GetCollection<ArticleDocument>();
public IMongoCollection<CommentDocument> Comments => GetCollection<CommentDocument>();
}
public interface ICommentsDbContext
{
IMongoCollection<CommentDocument> Comments { get; }
}
[MongoCollection(CollectionName = "Articles")]
public class ArticleDocument { }
[MongoCollection(CollectionName = "Comments")]
public class CommentDocument { }
// Configuration
services.AddMongoDb(options => { options.ConnectionString = "mongodb://localhost:27017"; });
services.AddMongoDbContext<WebSiteDbContext>(options =>
{
options.DatabaseName = "WebSite";
})
.AddExtension<WebSiteDbContext, ICommentsDbContext>()
.UseCamelCaseElementName()
.UseIgnoreIfNull(true)
.UseIgnoreIfDefault(false);
Using
var dbContext = serviceProvider.GetRequiredService<WebSiteDbContext>();
var commentsDbContext = serviceProvider.GetRequiredService<ICommentsDbContext>();
Testing with Mongo2Go
NuGet-package: https://www.nuget.org/packages/BrandUp.MongoDB.Testing.Mongo2Go/
services.AddTestMongoDb();
Testing with BrandUp.MongoDB.Testing
NuGet-package: https://www.nuget.org/packages/BrandUp.MongoDB.Testing/
services.AddFakeMongoDb();
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Options (>= 10.0.1)
- MongoDB.Driver (>= 3.5.2)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on BrandUp.MongoDB:
| Package | Downloads |
|---|---|
|
BrandUp.Pages.MongoDb
Package Description |
|
|
BrandUp.MongoDB.Testing
Package Description |
|
|
BrandUp.MongoDB.Testing.Mongo2Go
Package Description |
|
|
BrandUp.Worker.MongoDB
Package Description |
|
|
BrandUp.CardDav.Server
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.1 | 129 | 1/3/2026 |
| 8.0.9 | 448 | 7/14/2025 |
| 8.0.8 | 469 | 6/11/2025 |
| 8.0.3 | 316 | 3/29/2025 |
| 8.0.2 | 331 | 3/9/2025 |
| 8.0.1 | 277 | 12/22/2024 |
| 7.3.2 | 489 | 7/9/2024 |
| 7.3.1 | 261 | 7/9/2024 |
| 7.2.5 | 307 | 6/30/2024 |
| 7.2.3 | 397 | 4/29/2024 |
| 7.1.5 | 264 | 4/29/2024 |
| 7.1.4 | 795 | 1/20/2024 |
| 7.1.2 | 500 | 10/3/2023 |
| 7.1.1 | 807 | 3/11/2023 |
| 7.0.2 | 564 | 2/13/2023 |
| 7.0.1 | 778 | 11/10/2022 |
| 3.0.7 | 2,835 | 6/10/2022 |
| 3.0.6 | 2,004 | 4/21/2022 |
| 3.0.5 | 727 | 1/8/2022 |
| 3.0.3 | 924 | 10/27/2021 |
| 3.0.2 | 869 | 7/18/2021 |
| 3.0.1 | 1,377 | 12/21/2020 |
| 2.0.13 | 1,085 | 10/23/2020 |
| 2.0.12 | 1,068 | 8/3/2020 |
| 2.0.11 | 3,246 | 6/16/2020 |
| 2.0.10 | 976 | 5/29/2020 |
| 2.0.9 | 913 | 5/29/2020 |
| 2.0.8 | 1,023 | 5/20/2020 |
| 2.0.7 | 1,555 | 1/29/2020 |
| 2.0.6 | 1,483 | 11/27/2019 |
| 2.0.5 | 2,054 | 10/4/2019 |
| 2.0.3 | 1,548 | 9/26/2019 |
| 1.0.19 | 1,395 | 9/10/2019 |
| 1.0.18 | 3,008 | 7/8/2019 |
| 1.0.17 | 1,317 | 7/5/2019 |
| 1.0.16 | 1,007 | 7/5/2019 |
| 1.0.15 | 1,311 | 6/18/2019 |
| 1.0.12 | 3,009 | 6/3/2019 |
| 1.0.0.10 | 4,378 | 4/30/2019 |
| 1.0.0.9 | 1,084 | 4/29/2019 |
| 1.0.0.8 | 1,138 | 4/28/2019 |
| 1.0.0.6 | 1,101 | 4/18/2019 |
| 1.0.0.5 | 1,357 | 4/14/2019 |
| 1.0.0.4 | 1,123 | 4/14/2019 |
| 1.0.0.3 | 1,045 | 4/14/2019 |
| 1.0.0.2 | 1,075 | 4/14/2019 |