public void OnlySale()
 {
     if (Filters.OnlySale != null)
     {
         ProductCards = ProductCards.Where(productCards => productCards.Sale == true).ToList();
     }
 }
 public void OnlyAvailability()
 {
     if (Filters.OnlyAvailability != null)
     {
         ProductCards = ProductCards.Where(productCards => productCards.CountToStore > 0).ToList();
     }
 }
 public void BetweenPrice()
 {
     if (Filters.MinPrice != null && Filters.MaxPrice != null)
     {
         ProductCards = ProductCards.Where(productCards => productCards.Price >= Filters.MinPrice &&
                                           productCards.Price <= Filters.MaxPrice).ToList();
     }
 }
 public void SelectFilter()
 {
     if (Filters.SelectFromSelectList != null)
     {
         int productTypeId = Convert.ToInt32(Filters.SelectFromSelectList);
         if (productTypeId != 0)//0 - all type
         {
             ProductCards = ProductCards.Where(productCards => productCards.ProductTypeId == productTypeId || productCards.ParentTypeId == productTypeId).ToList();
         }
     }
 }