public void DeleteTrainingExercise(TrainingExerciseKey key) { var trainingExercise = GetTrainingExercise(key); if (trainingExercise != null) { _trainingExerciseModule.Delete(trainingExercise); if (trainingExercise.TrainingExerciseSets != null) { foreach (var trainingExerciseSet in trainingExercise.TrainingExerciseSets) { _trainingExerciseSetManager.DeleteTrainingExerciseSet(trainingExerciseSet); } } } }
public void DeleteTrainingExercise(TrainingExerciseKey key) { var trainingExercise = GetTrainingExercise(key); if (trainingExercise != null) { _trainingExerciseModule.Delete(trainingExercise); SynchroManager.TrainingExerciseChange(DbContext, trainingExercise, true); if (trainingExercise.TrainingExerciseSets != null) { foreach (var trainingExerciseSet in trainingExercise.TrainingExerciseSets) { _trainingExerciseSetModule.Delete(trainingExerciseSet); } } } }