// GET: Discount/Edit/5
        public IActionResult Edit(int id)
        {
            var discount = _discountService.GetById(id);

            if (discount == null)
            {
                return(RedirectToAction("Error", "Home"));
            }

            var item  = _catalogService.FindCatalogItemByDiscountId(id);
            var model = new DiscountViewModel
            {
                DiscountId  = discount.Id,
                ExpireDate  = discount.ExpireDateInUtc,
                NewPrice    = discount.NewValue,
                OldPrice    = discount.OldValue,
                ProductId   = item.Id,
                ProductName = item.Name
            };

            return(View(model));
        }