瀏覽代碼

add UserMongoDB extension method

master
Savorboard 6 年之前
父節點
當前提交
57a004aeb3
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. +5
    -0
      src/DotNetCore.CAP.MongoDB/CAP.Options.Extensions.cs

+ 5
- 0
src/DotNetCore.CAP.MongoDB/CAP.Options.Extensions.cs 查看文件

@@ -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)


Loading…
取消
儲存