public ActionResult DeleteConfirmed(int id)
        {
            Attraction attraction = dataGateway.SelectById(id);

            dataGateway.Delete(id);
            return(RedirectToAction("Index"));
        }
Example #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Restaurant myRestaurant = dataGateway.SelectById(id);

            dataGateway.Delete(id);
            return(RedirectToAction("Index"));
        }
Example #3
0
        public virtual IActionResult DeleteConfirmed(int id)
        {
            //var booking = await _context.Booking.FindAsync(id);
            //_context.Booking.Remove(booking);
            //await _context.SaveChangesAsync();
            var booking = dataGateway.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }
Example #4
0
 public ActionResult DeleteConfirmed(int id)
 {
     bookDataGateway.Delete(id);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Example #5
0
 public ActionResult DeleteConfirmed(int id)
 {
     DataGateway.Delete(id);
     return(RedirectToAction("Index"));
 }