public void DeleteUpdate(int id) { var update = updateRepository.GetById(id); updateRepository.Delete(update); SaveUpdate(); }
public ActionResult Delete(int?id) { if (id == null) { return(View("Error")); } if (!User.Identity.IsAuthenticated) { return(View("Error")); } _updateRepository.Delete(id.Value); return(RedirectToAction("Index")); }