Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public Generic(EnitiesContext context)
 {
     Context = context;
     dbSet   = Context.Set <T>();
 }