MongoDb
Installation
dotnet add package Dosaic.Plugins.Persistence.MongoDb<PackageReference Include="Dosaic.Plugins.Persistence.MongoDb" Version="" />Appsettings.yml
mongodb:
host: "localhost"
database: "mongodb"
port: "27017"
password: "mongodb"
user: "mongodb"[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!;
}Configuration in your plugin host
Usage
IMongoDbInstance
Last updated