public async Task <IActionResult> Index() { if (User.IsInRole("RoleGuide")) { var userId = int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value); var guide = await _repository.GetGuideByUserId(userId); return(View(await _repository.GetGuestReservationsByGuideId(guide.Id))); } return(View(await _repository.GetGuestReservations())); }