public ActionResult DeleteRoom(int id, int resortId, int hotelId) { Room room = repository.GetRoomById(id); repository.RemoveRoom(id); if (hotelId != 0) { return(RedirectToAction("EditHotel", "Owner", new { id = hotelId })); } else { return(RedirectToAction("EditResort", "Owner", new { id = resortId })); } }