public UnitOfWork( EnitiesContext _context, Generic <Group> groupRepo, Generic <Customer> customerRepo, Generic <Invoice> invoiceRepo, Generic <Item> itemRepo, Generic <InvoiceItem> invoiceItemRepo ) { context = _context; CustomerRepo = customerRepo; CustomerRepo.Context = context; GroupRepo = groupRepo; GroupRepo.Context = context; InvoiceRepo = invoiceRepo; InvoiceRepo.Context = context; ItemRepo = itemRepo; ItemRepo.Context = context; InvoiceItemRepo = invoiceItemRepo; InvoiceItemRepo.Context = context; }
public Generic(EnitiesContext context) { Context = context; dbSet = Context.Set <T>(); }