Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Actor actor = actorsRepository.GetActorById(id);

            actorsRepository.DeleteActor(id);
            TempData["Notification"] = actor.Name + " has been deleted from the actors database!";
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        // GET: Movies/Delete/5
        public ActionResult Delete(int id)
        {
            // var actor = new Actors { Id = id };

            actorsRepository.DeleteActor(id);

            return(RedirectToAction("List"));
        }