public void DeleteUpdate(int id)
        {
            var update = updateRepository.GetById(id);

            updateRepository.Delete(update);
            SaveUpdate();
        }
Exemple #2
0
        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"));
        }