Beispiel #1
0
        internal TrainingDay GetTrainingDay(TrainingDayKey key, TrainingDayScenario scenario)
        {
            var trainingDay = _trainingDayModule.Get(key, AppUtils.GetUserUnit(_userInfosService, key.UserId));

            if (scenario != null && scenario.ManageExercise && trainingDay != null)
            {
                CompleteTrainingDayWithExercise(trainingDay);
            }

            return(trainingDay);
        }
        internal TrainingDay GetTrainingDay(TrainingDayKey key, TrainingDayScenario scenario)
        {
            var trainingDay = _trainingDayModule.Get(key);

            if (scenario != null && scenario.ManageExercise && trainingDay != null)
            {
                CompleteTrainingDayWithExercise(trainingDay);
            }

            return(trainingDay);
        }
        internal TrainingDay GetTrainingDay(TrainingDayKey key, TrainingDayScenario trainingDayScenario)
        {
            var trainingDay = _trainingDayModule.Get(key, AppUtils.GetUserUnit(_userInfosService, key.UserId));

            if (trainingDayScenario.ManageExercise && trainingDay != null)
            {
                var trainingExerciseCriteria = CreateTrainingExerciseCriteria(trainingDay);
                trainingDay.TrainingExercises = _trainingExercisesService.FindTrainingExercise(trainingExerciseCriteria);
            }

            return(trainingDay);
        }