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