public List <IssueDto> GetAll() { var allIssues = _mapper.Map <List <IssueDto> >(_issueRepository.GetAllWithDetails()); foreach (IssueDto issue in allIssues) { issue.IssueStates = _mapper.Map <List <IssueStateDto> >(_issueStateRepository.GetAllByIssueIdAsync(issue.Id).Result); } return(allIssues); }
public async Task <List <IssueStateDto> > GetAllByIssueIdAsync(Guid IssueId) { var IssueStates = await _issueStateRepository.GetAllByIssueIdAsync(IssueId); return(_mapper.Map <List <IssueStateDto> >(IssueStates)); }