public static IBioWorldBuilder AddMongo(this IBioWorldBuilder builder, Func <IMongoDbOptionsBuilder, IMongoDbOptionsBuilder> buildOptions, Type seederType = null, bool registerConventions = true) { var mongoOptions = buildOptions(new MongoDbOptionsBuilder()).Build(); return(builder.AddMongo(mongoOptions, seederType, registerConventions)); }
public static IBioWorldBuilder AddMongo(this IBioWorldBuilder builder, string sectionName = SectionName, Type seederType = null, bool registerConventions = true) { if (string.IsNullOrWhiteSpace(sectionName)) { sectionName = SectionName; } var mongoOptions = builder.GetOptions <MongoDbOptions>(sectionName); return(builder.AddMongo(mongoOptions, seederType, registerConventions)); }