Пример #1
0
 public SqlCrmRepository(DbContextOptionsBuilder <CrmContext>
                         dbOptionsBuilder)
 {
     _dbOptions = dbOptionsBuilder.Options;
     using (var db = new CrmContext(_dbOptions))
     {
         db.Database.EnsureCreated();
     }
 }
Пример #2
0
 public SqlCustomerRepository(CrmContext db)
 {
     _db = db;
 }
Пример #3
0
 public SqlOrderRepository(CrmContext db) => _db = db;
Пример #4
0
 public SqlProductRepository(CrmContext db)
 {
     _db = db;
 }