BrandUp.MongoDB
8.0.9
dotnet add package BrandUp.MongoDB --version 8.0.9
NuGet\Install-Package BrandUp.MongoDB -Version 8.0.9
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="8.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BrandUp.MongoDB" Version="8.0.9" />
<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 8.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BrandUp.MongoDB, 8.0.9"
#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@8.0.9
#: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=8.0.9
#tool nuget:?package=BrandUp.MongoDB&version=8.0.9
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 | 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.
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Options (>= 9.0.7)
- MongoDB.Driver (>= 3.4.0)
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 |
---|---|---|
8.0.9 | 146 | 7/14/2025 |
8.0.8 | 354 | 6/11/2025 |
8.0.3 | 210 | 3/29/2025 |
8.0.2 | 226 | 3/9/2025 |
8.0.1 | 160 | 12/22/2024 |
7.3.2 | 362 | 7/9/2024 |
7.3.1 | 149 | 7/9/2024 |
7.2.5 | 191 | 6/30/2024 |
7.2.3 | 272 | 4/29/2024 |
7.1.5 | 161 | 4/29/2024 |
7.1.4 | 670 | 1/20/2024 |
7.1.2 | 440 | 10/3/2023 |
7.1.1 | 701 | 3/11/2023 |
7.0.2 | 476 | 2/13/2023 |
7.0.1 | 662 | 11/10/2022 |
3.0.7 | 2,660 | 6/10/2022 |
3.0.6 | 1,842 | 4/21/2022 |
3.0.5 | 615 | 1/8/2022 |
3.0.3 | 819 | 10/27/2021 |
3.0.2 | 763 | 7/18/2021 |
3.0.1 | 1,232 | 12/21/2020 |
2.0.13 | 957 | 10/23/2020 |
2.0.12 | 967 | 8/3/2020 |
2.0.11 | 2,934 | 6/16/2020 |
2.0.10 | 859 | 5/29/2020 |
2.0.9 | 829 | 5/29/2020 |
2.0.8 | 896 | 5/20/2020 |
2.0.7 | 1,413 | 1/29/2020 |
2.0.6 | 1,327 | 11/27/2019 |
2.0.5 | 1,901 | 10/4/2019 |
2.0.3 | 1,380 | 9/26/2019 |
1.0.19 | 1,246 | 9/10/2019 |
1.0.18 | 2,731 | 7/8/2019 |
1.0.17 | 1,182 | 7/5/2019 |
1.0.16 | 881 | 7/5/2019 |
1.0.15 | 1,198 | 6/18/2019 |
1.0.12 | 2,787 | 6/3/2019 |
1.0.0.10 | 3,951 | 4/30/2019 |
1.0.0.9 | 975 | 4/29/2019 |
1.0.0.8 | 1,013 | 4/28/2019 |
1.0.0.6 | 971 | 4/18/2019 |
1.0.0.5 | 1,197 | 4/14/2019 |
1.0.0.4 | 991 | 4/14/2019 |
1.0.0.3 | 935 | 4/14/2019 |
1.0.0.2 | 955 | 4/14/2019 |