public async Task <ActionResult <ExerciseForReturnDto> > GetExerciseAsync(int id) { var exercise = await exerciseRepository.GetByIdAsync(id); if (exercise == null) { return(NotFound()); } var exerciseToReturn = mapper.Map <ExerciseForReturnDto>(exercise); return(Ok(exerciseToReturn)); }