Exemplo n.º 1
0
        public void DeleteUpdate(int id)
        {
            var update = updateRepository.GetById(id);

            updateRepository.Delete(update);
            SaveUpdate();
        }
Exemplo n.º 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"));
        }