Exemple #1
0
        public ResponseDto <StatisticDto> GetStatistic(int statisticId)
        {
            var response = new ResponseDto <StatisticDto>();

            var statistic = _statisticRepository.GetById(statisticId);

            if (statistic == null)
            {
                response.Errors.Add(ServiceErrors.STATISTIC_DOES_NOT_EXIST);
                return(response);
            }

            response.Object = _mapper.Map <StatisticDto>(statistic);

            return(response);
        }