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)); }
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)); }