Exemplo n.º 1
0
        public ActionResult Delete(int id, string listName)
        {
            Cinema cinema = _context.FindCinemaByID(id);

            _context.CinemaCollection.Remove(cinema);
            _context.SaveChanges();
            if (listName == "AllCinema")
            {
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                return(RedirectToAction("MyCinema", "Cinema"));
            }
        }