public int GetDiscountedPrice(char productId, int cartItemQuantity, int actualProductPrice) { var offers = specialOffersRepository.GetSpecialOffersByType <BuyMultipleProductsForPriceReductionOffer>(). Where(x => x.ProductId == productId). OrderByDescending(x => x.ItemQuantity).ToList(); return(offers != null && offers.Any() ? GetDiscountedPrice(offers, cartItemQuantity, actualProductPrice) : actualProductPrice *cartItemQuantity); }