Beispiel #1
0
 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));
            }
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 public ProductSpecificationRepository(ProductSpecificationDataContext context)
 {
     this.context = context;
 }