public async Task <ActionResult <MeetingViewModel> > GetMeeting(int meetingId) { var meeting = await _meetingRepository.GetAsync(meetingId); if (meeting == null) { return(NotFound()); } var attendees = await _attendeeRepository.GetAllWithRolesByMeetingAsync(meeting.Id); var model = ViewModelHelper.Convert(meeting, attendees); return(model); }
public async Task <ActionResult <IEnumerable <AttendeeViewModel> > > GetAttendees(int meetingId) { var entites = await _attendeeRepository.GetAllWithRolesByMeetingAsync(meetingId); return(Ok(ViewModelHelper.Convert(entites))); }