public ActionResult Delete(int LotID) { Lot deletedLot = repository.DeleteLot(LotID); if (deletedLot != null) { TempData["message"] = string.Format("{0} Удалён", deletedLot.Name); } return(RedirectToAction("Index")); }