Commit 57a004ae authored by Savorboard's avatar Savorboard

add UserMongoDB extension method

parent 925d28ac
...@@ -15,6 +15,11 @@ namespace Microsoft.Extensions.DependencyInjection ...@@ -15,6 +15,11 @@ namespace Microsoft.Extensions.DependencyInjection
return options.UseMongoDB(x => { }); 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) public static CapOptions UseMongoDB(this CapOptions options, Action<MongoDBOptions> configure)
{ {
if (configure == null) if (configure == null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment