public ProductCategoryService(UnitOfWork unitOfWork, ProductCategoryRepo catRepo, ProductSubCategoryRepo subCatRepo) { this.unitOfWork = unitOfWork; this.catRepo = unitOfWork.ProductCategoryRepo; this.subCatRepo = unitOfWork.ProductSubCategoryRepo; }
public ProductCategoryService() { this.unitOfWork = new UnitOfWork(); this.catRepo = new UnitOfWork().ProductCategoryRepo; this.subCatRepo = new UnitOfWork().ProductSubCategoryRepo; }
public UnitOfWork() { this.Context = new JooleAppEntities(); productSubCategoryRepo = new ProductSubCategoryRepo(Context); }