Exemple #1
0
        public static IFixerBuilder AddMongo(this IFixerBuilder builder, Func <IMongoDbOptionsBuilder,
                                                                               IMongoDbOptionsBuilder> buildOptions, IMongoDbSeeder seeder = null)
        {
            var mongoOptions = buildOptions(new MongoDbOptionsBuilder()).Build();

            return(builder.AddMongo(mongoOptions, seeder));
        }
Exemple #2
0
        public static IFixerBuilder AddMongo(this IFixerBuilder builder, string sectionName = SectionName,
                                             IMongoDbSeeder seeder = null)
        {
            var mongoOptions = builder.GetOptions <MongoDbOptions>(sectionName);

            return(builder.AddMongo(mongoOptions, seeder));
        }