Esempio n. 1
0
        public ActionResult DeletePost(int id)
        {
            var service = new DescriptionService();

            if (service.DeleteDescription(id))
            {
                TempData["SaveResult"] = "Description Deleted";
                return(RedirectToAction("Index"));
            }

            ModelState.AddModelError("", "Description could not be updated");
            var model = service.GetDescription(id);

            return(View(model));
        }
Esempio n. 2
0
 public int DeleteById(int id)
 {
     return(DescriptionService.DeleteDescription(id));
 }