Example #1
0
        public async Task <DatasetModel> GetByIdAsync(int id)
        {
            var dataset = await _datasetRepository.GetByIdAsync(id);

            if (dataset == null)
            {
                throw new InvalidDataException($"Can't get Dataset with id {id}!");
            }
            return(_mapper.Map <DatasetModel>(dataset));
        }