Explorar el Código

add UserMongoDB extension method

master
Savorboard hace 6 años
padre
commit
57a004aeb3
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. +5
    -0
      src/DotNetCore.CAP.MongoDB/CAP.Options.Extensions.cs

+ 5
- 0
src/DotNetCore.CAP.MongoDB/CAP.Options.Extensions.cs Ver fichero

@@ -15,6 +15,11 @@ namespace Microsoft.Extensions.DependencyInjection
return options.UseMongoDB(x => { });
}

public static CapOptions UseMongoDB(this CapOptions options, string connectionString)
{
return options.UseMongoDB(x => { x.DatabaseConnection = connectionString; });
}

public static CapOptions UseMongoDB(this CapOptions options, Action<MongoDBOptions> configure)
{
if (configure == null)


Cargando…
Cancelar
Guardar