public UnitOfWork(HomemadeDbContext context = null) { this._context = context ?? new HomemadeDbContext(); this.CartProducts = new Repository <CartProduct>(this._context); this.Categories = new Repository <Category>(this._context); this.Orders = new Repository <Order>(this._context); this.Products = new Repository <Product>(this._context); this.ShoppingCarts = new Repository <ShoppingCart>(this._context); this.Users = new UserRepository(this._context); }
public UserRepository(HomemadeDbContext context = null) : base(context) { }
public Repository(HomemadeDbContext context = null) { this._context = context ?? new HomemadeDbContext(); }