예제 #1
0
 public UnitOfWork(BookingDbContext context)
 {
     this.context            = context;
     ProductRepository       = new ProductRepository(context);
     ShopRepository          = new ShopRepository(context);
     ProductInShopRepository = new ProductInShopRepository(context);
     UserRepository          = new UserRepository(context);
     BookingRepository       = new BookingRepository(context);
 }
예제 #2
0
 public UserRepository(BookingDbContext context) : base(context)
 {
     this.context = context;
 }
예제 #3
0
 public ProductRepository(BookingDbContext context) : base(context)
 {
     this.context = context;
 }
예제 #4
0
 public Repository(BookingDbContext context)
 {
     this.context = context;
     dbSet        = context.Set <TEntity>();
 }