![]() |
VOOZH | about |
dotnet add package PiBox.Plugins.Persistence.MongoDb --version 1.1.2
NuGet\Install-Package PiBox.Plugins.Persistence.MongoDb -Version 1.1.2
<PackageReference Include="PiBox.Plugins.Persistence.MongoDb" Version="1.1.2" />
<PackageVersion Include="PiBox.Plugins.Persistence.MongoDb" Version="1.1.2" />Directory.Packages.props
<PackageReference Include="PiBox.Plugins.Persistence.MongoDb" />Project file
paket add PiBox.Plugins.Persistence.MongoDb --version 1.1.2
#r "nuget: PiBox.Plugins.Persistence.MongoDb, 1.1.2"
#:package PiBox.Plugins.Persistence.MongoDb@1.1.2
#addin nuget:?package=PiBox.Plugins.Persistence.MongoDb&version=1.1.2Install as a Cake Addin
#tool nuget:?package=PiBox.Plugins.Persistence.MongoDb&version=1.1.2Install as a Cake Tool
PiBox.Plugins.Persistence.MongoDb is a plugin that allows other PiBox components to use the MongoDb core to interact with certain databases.
To install the nuget package follow these steps:
dotnet add package PiBox.Plugins.Persistence.MongoDb
or add as package reference to your .csproj
<PackageReference Include="PiBox.Plugins.Persistence.MongoDb" Version="" />
Configure your appsettings.yml with these properties
Postgres for example
mongodb:
host: "localhost"
database: "mongodb"
port: "27017"
password: "mongodb"
user: "mongodb"
MongoDbConfiguration.cs
[Configuration("mongodb")]
public class MongoDbConfiguration
{
public string Host { get; set; } = null!;
public int Port { get; set; }
public string Database { get; set; } = null!;
public string AuthDatabase { get; set; } = null!;
public string User { get; set; } = null!;
public string Password { get; set; } = null!;
}
Nothing to configure
public class ExampleService
{
private readonly IReadRepository<MyPoco> _readRepository;
public ExampleService(IReadRepository<MyPoco> readRepository)
{
_readRepository = readRepository;
}
public async Task DoStuff()
{
// for example
var result = await _readRepository.FindByIdAsync();
}
}
public class ExampleService
{
private readonly IMongoDbInstance _mongoDbInstance;
public ExampleService(IMongoDbInstance mongoDbInstance)
{
_mongoDbInstance = mongoDbInstance;
}
public async Task DoStuff()
{
// for example
var mongoCollection = _mongoDbInstance.GetCollectionFor<MyCollectionEntity>();
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.2 | 259 | 2/4/2025 |
| 1.0.91 | 209 | 1/24/2025 |
| 1.0.85 | 219 | 1/15/2025 |
| 1.0.79 | 235 | 12/20/2024 |
| 1.0.73 | 194 | 10/22/2024 |
| 1.0.66 | 216 | 10/15/2024 |
| 1.0.64 | 219 | 10/14/2024 |
| 1.0.61 | 226 | 10/1/2024 |
| 1.0.60 | 285 | 9/27/2024 |
| 1.0.54 | 253 | 4/30/2024 |
| 1.0.51 | 273 | 2/27/2024 |
| 1.0.49 | 254 | 2/27/2024 |
| 1.0.47 | 244 | 2/21/2024 |
| 1.0.45 | 243 | 2/20/2024 |
| 1.0.43 | 251 | 2/13/2024 |
| 1.0.41 | 238 | 2/13/2024 |
| 1.0.39 | 246 | 2/8/2024 |
| 1.0.38 | 232 | 2/8/2024 |
| 1.0.6 | 216 | 2/4/2025 |
| 1.0.4 | 216 | 2/4/2025 |