コード例 #1
0
ファイル: IssueService.cs プロジェクト: andrei131298/CivicHub
        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);
        }
コード例 #2
0
        public async Task <List <IssueStateDto> > GetAllByIssueIdAsync(Guid IssueId)
        {
            var IssueStates = await _issueStateRepository.GetAllByIssueIdAsync(IssueId);

            return(_mapper.Map <List <IssueStateDto> >(IssueStates));
        }