public ActionResult DeletePromotion(int promotionID)
        {
            Promotion deletedPromotion = promotionRepository.DeletePromotion(promotionID);

            if (deletedPromotion != null)
            {
                TempData["message"] = string.Format("Usunieto {0}", deletedPromotion.Name);
            }
            return(RedirectToAction("PromotionList"));
        }
 public IActionResult Delete(int id)
 {
     try
     {
         var isDeleted = promotionRepository.DeletePromotion(id);
         return(Ok(isDeleted));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public IActionResult DeleteConfirmed(int id)
 {
     _promotionRepository.DeletePromotion(id);
     return(RedirectToAction(nameof(Index)));
 }