Ejemplo n.º 1
0
        public async Task <IActionResult> AddExercise(ExerciseForAddDto exerciseForAddDto)
        {
            var exerciseToAdd = new Exercise
            {
                Name  = exerciseForAddDto.Name,
                Sets  = exerciseForAddDto.Sets,
                DayId = exerciseForAddDto.DayId
            };

            var addedExercise = await _repo.AddExercise(exerciseToAdd);

            return(StatusCode(201));
        }