示例#1
0
        private CardioTrainingDTO ConvertCardioTraining(CardioTraining cardioTraining)
        {
            CardioTrainingDTO cardioTrainingDTO = new CardioTrainingDTO(
                ConvertExercise(cardioTraining.Exercise),
                cardioTraining.Distance,
                cardioTraining.Time,
                cardioTraining.TrainingID,
                cardioTraining.UserID,
                cardioTraining.Date,
                (TrainingTypeDTO)cardioTraining.TrainingType);

            return(cardioTrainingDTO);
        }
示例#2
0
        private CardioTraining ConvertCardioTrainingDTO(CardioTrainingDTO cardioTrainingDTO)
        {
            CardioTraining cardioTraining = new CardioTraining(ConvertExerciseDTO(cardioTrainingDTO.Exercise), cardioTrainingDTO.Distance, cardioTrainingDTO.Time, cardioTrainingDTO.TrainingID, cardioTrainingDTO.UserID, cardioTrainingDTO.Date, (TrainingType)cardioTrainingDTO.TrainingType);

            return(cardioTraining);
        }