Esempio n. 1
0
        public static IDrexBuilder AddSqlServer <TMyDbContext>(this IDrexBuilder builder,
                                                               Func <ISqlServerOptionsBuilder,
                                                                     ISqlServerOptionsBuilder> buildOptions) where TMyDbContext : DbContext
        {
            var mongoOptions = buildOptions(new SqlServerOptionsBuilder()).Build();

            return(builder.AddSqlServer <TMyDbContext>(mongoOptions));
        }
Esempio n. 2
0
        public static IDrexBuilder AddSqlServer <TMyDbContext>(this IDrexBuilder builder,
                                                               string sectionName = SectionName)
            where TMyDbContext : DbContext
        {
            if (string.IsNullOrWhiteSpace(sectionName))
            {
                sectionName = SectionName;
            }

            var mongoOptions = builder.GetOptions <SqlServerOptions>(sectionName);

            return(builder.AddSqlServer <TMyDbContext>(mongoOptions));
        }