Exemple #1
0
        public IActionResult Delete(int id)
        {
            if (_db.Discounts.Any(d => d.DiscountId == id))
            {
                _db.DeleteDiscount(id);
            }
            else
            {
                return(NotFound());
            }

            return(Redirect("/Discount/Index"));
        }