public UnitOfWork(SportyContext db) { this.db = db; Category = new CategoryRepository(db); Product = new ProductRepository(db); Order = new OrderRepository(db); User = new UserRepository(db); this.db.Database.EnsureCreated(); }
public OrderRepository(SportyContext db) : base(db) { this.db = db; }
public ProductRepository(SportyContext db) : base(db) { this.db = db; }
public ProductV1Controller(SportyContext context) { this.context = context; this.context.Database.EnsureCreated(); }
public Repository(SportyContext db) { this.db = db; this.dbSet = this.db.Set <T>(); }
public CategoryRepository(SportyContext db) : base(db) { this.db = db; }