public async Task <IActionResult> DeleteConfirmed(int id)
        {
            if (id == 0)
            {
                return(NotFound());
            }

            await _hotel.DeleteHotelAsync(id);

            return(RedirectToAction(nameof(Index)));
        }
Esempio n. 2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _context.DeleteHotelAsync(id);

            return(RedirectToAction(nameof(Index)));
        }