Example #1
0
        public async Task <List <VerdictDTO> > GetCopiedSolutionAsync(int verdictId)
        {
            List <VerdictDTO> solutionList = new List <VerdictDTO>();

            var copyList = await _verdictRepository.GetCopiedSolutionListAsync(verdictId);

            foreach (var copy in copyList)
            {
                var verdict = await _verdictRepository.GetVerdictAsync((int)copy.SimilarVerdictId);

                var mappedVerdict = _mapper.Map <VerdictDTO>(verdict);
                solutionList.Add(mappedVerdict);
            }
            return(solutionList);
        }
Example #2
0
        public async Task <VerdictDTO> GetVerdictAsync(int verdictId)
        {
            var verdicts = await _repository.GetVerdictAsync(verdictId);

            return(_mapper.Map <VerdictDTO>(verdicts));
        }