public async Task <ActionResult <AttendeeViewModel> > GetAttendee(int meetingId, int attendeeId) { var exists = _meetingRepository.Exists(meetingId); if (false == exists) { return(BadRequest()); } var entity = await _attendeeRepository.GetWithRolesAsync(attendeeId); if (entity == null) { return(NotFound()); } if (meetingId != entity.MeetingId) { return(BadRequest("Meeting don't match")); } return(ViewModelHelper.Convert(entity)); }