public async Task <IActionResult> AddBed(int hotelId, int roomId) { var beds = await bedService.FindAll(); var hotel = await hotelService.FindByIdAsync(hotelId); if (hotel.ApplicationUserId == User.FindFirstValue(ClaimTypes.NameIdentifier) || User.IsInRole("Admin")) { return(View(new BedViewModel { Beds = beds, RoomId = roomId, HotelId = hotelId })); } return(RedirectToAction(nameof(AccountController.AccessDenied), "Account")); }