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 | 35 | 7/14/2025 |
8.0.8 | 347 | 6/11/2025 |
8.0.3 | 202 | 3/29/2025 |
8.0.2 | 220 | 3/9/2025 |
8.0.1 | 155 | 12/22/2024 |
7.3.2 | 357 | 7/9/2024 |
7.3.1 | 144 | 7/9/2024 |
7.2.5 | 186 | 6/30/2024 |
7.2.3 | 267 | 4/29/2024 |
7.1.5 | 156 | 4/29/2024 |
7.1.4 | 666 | 1/20/2024 |
7.1.2 | 435 | 10/3/2023 |
7.1.1 | 690 | 3/11/2023 |
7.0.2 | 465 | 2/13/2023 |
7.0.1 | 651 | 11/10/2022 |
3.0.7 | 2,646 | 6/10/2022 |
3.0.6 | 1,829 | 4/21/2022 |
3.0.5 | 602 | 1/8/2022 |
3.0.3 | 806 | 10/27/2021 |
3.0.2 | 749 | 7/18/2021 |
3.0.1 | 1,218 | 12/21/2020 |
2.0.13 | 942 | 10/23/2020 |
2.0.12 | 953 | 8/3/2020 |
2.0.11 | 2,919 | 6/16/2020 |
2.0.10 | 845 | 5/29/2020 |
2.0.9 | 814 | 5/29/2020 |
2.0.8 | 882 | 5/20/2020 |
2.0.7 | 1,399 | 1/29/2020 |
2.0.6 | 1,313 | 11/27/2019 |
2.0.5 | 1,887 | 10/4/2019 |
2.0.3 | 1,367 | 9/26/2019 |
1.0.19 | 1,232 | 9/10/2019 |
1.0.18 | 2,717 | 7/8/2019 |
1.0.17 | 1,168 | 7/5/2019 |
1.0.16 | 867 | 7/5/2019 |
1.0.15 | 1,183 | 6/18/2019 |
1.0.12 | 2,772 | 6/3/2019 |
1.0.0.10 | 3,936 | 4/30/2019 |
1.0.0.9 | 960 | 4/29/2019 |
1.0.0.8 | 998 | 4/28/2019 |
1.0.0.6 | 956 | 4/18/2019 |
1.0.0.5 | 1,182 | 4/14/2019 |
1.0.0.4 | 976 | 4/14/2019 |
1.0.0.3 | 920 | 4/14/2019 |
1.0.0.2 | 939 | 4/14/2019 |