Exemplo n.º 1
0
        public async Task <IActionResult> DeleteExercise(ExerciseViewModel exerciseViewModel)
        {
            var exerciseId = exerciseViewModel.Id;

            var trainingId = await _exerciseService.DeleteExercise(exerciseId);

            int trainingNumber = await _trainingService.GetTrainingNumber(trainingId);

            TempData["Message"] = "Exercise Removed";
            return(RedirectToAction("CreateTraining", new { trainingNumber }));
        }
 public void Delete(int id)
 {
     _exerciseService.DeleteExercise(id);
 }
Exemplo n.º 3
0
        public async Task <IActionResult> DeleteExercise(int id)
        {
            await _exerciseService.DeleteExercise(id);

            return(RedirectToAction("ShowAllExercises", "Administration"));
        }
Exemplo n.º 4
0
        public IActionResult DeleteExercise(int id)
        {
            _exerciseService.DeleteExercise(id);

            return(RedirectToAction("Index"));
        }