Example #1
0
 public MsSqlRepository(TDbContext dbContext, MsSqlDataSource dataSource, IConnectionStringProvider connectionStringProvider)
     : base(dbContext)
 {
     _connectionString = connectionStringProvider.GetConnectionStringFor(dataSource);
 }
Example #2
0
 protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
 {
     optionsBuilder
     .UseSqlServer(_dataSourceConnectionStringProvider.GetConnectionStringFor(DataSource))
     .ConfigureWarnings(warnings => warnings.Throw(RelationalEventId.QueryClientEvaluationWarning));
 }