public List <ProductFilterValueResultSet> GetProductFilterValues(int productId) { using (ProductSpecificationDataContext dc = new ProductSpecificationDataContext()) { ProductSpecificationRepository repo = new ProductSpecificationRepository(dc); return(repo.GetProductFilterValues(productId)); } return(null); }
public bool UpdateFilterParameters(List <CategoryMasterFilterResultSet> categoryMasterFilter) { using (ProductSpecificationDataContext dc = new ProductSpecificationDataContext()) { ProductSpecificationRepository repo = new ProductSpecificationRepository(dc); repo.AddCategoryMasterFilter(categoryMasterFilter); } return(true); }
public List <CategoryMasterFilter> GetCategoryFilters(int categoryId) { //var categoryfilterQuery = "Select Id, Category, FilterParameter from [CategoryMasterFilter] Where Category = {categoryId}".FormatWith(categoryId); //List<CategoryMasterFilter> categoryMasterFilterList = _unitOfWork.ExecuteQuery<CategoryMasterFilter>(categoryfilterQuery).ToList(); //return categoryMasterFilterList; using (ProductSpecificationDataContext dc = new ProductSpecificationDataContext()) { ProductSpecificationRepository repo = new ProductSpecificationRepository(dc); return(repo.GetCategoryMasterFilter(categoryId)); } }
public bool UpdateProductSpecifications(ProductSpecificationsAllDTO productSpecifications) { var filter = productSpecifications.productFilters; var keyFeatures = productSpecifications.productKeyFeatures; var specifications = productSpecifications.productSpecifications; using (ProductSpecificationDataContext dc = new ProductSpecificationDataContext()) { ProductSpecificationRepository repo = new ProductSpecificationRepository(dc); repo.AddFilter(filter); repo.AddKeyFeatures(keyFeatures); repo.AddSpecifications(specifications); } return(true); }
public ProductSpecificationRepository(ProductSpecificationDataContext context) { this.context = context; }