예제 #1
0
 public SqlContosoRepository(DbContextOptionsBuilder <ContosoContext>
                             dbOptionsBuilder)
 {
     _dbOptions = dbOptionsBuilder.Options;
     using (var db = new ContosoContext(_dbOptions))
     {
         db.Database.EnsureCreated();
     }
 }
예제 #2
0
 public SqlOrderRepository(ContosoContext db) => _db = db;
예제 #3
0
 public SqlProductRepository(ContosoContext db)
 {
     _db = db;
 }
예제 #4
0
 public SqlCustomerRepository(ContosoContext db)
 {
     _db = db;
 }