コード例 #1
0
        public async Task <ActionResult <ExerciseForReturnDetailedDto> > GetExerciseDetailedAsync(int id)
        {
            var exercise = await exerciseRepository.GetByIdDetailedAsync(id);

            if (exercise == null)
            {
                return(NotFound());
            }

            var exerciseToReturn = mapper.Map <ExerciseForReturnDetailedDto>(exercise);

            return(Ok(exerciseToReturn));
        }