コード例 #1
0
        public static Quizz MapToQuizz(this QuizzModel QuizzModel)
        {
            var Quizz = new Quizz();

            if (QuizzModel == null)
            {
                return(Quizz);
            }

            Quizz = new Quizz
            {
                UserLastName  = QuizzModel.UserLastname,
                UserFirstName = QuizzModel.UserFirstname,
                QuestionCount = QuizzModel.QuestionCount,
                TechnologyId  = QuizzModel.TechnologyId
            };
            return(Quizz);
        }
コード例 #2
0
        public static QuizzModel MapToQuizzModel(this Quizz Quizz)
        {
            var QuizzModel = new QuizzModel();

            if (Quizz == null)
            {
                return(QuizzModel);
            }

            QuizzModel = new QuizzModel
            {
                QuestionCount = Quizz.QuestionCount,
                TechnologyId  = Quizz.TechnologyId,
                UserFirstname = Quizz.UserFirstName,
                UserLastname  = Quizz.UserLastName
            };
            return(QuizzModel);
        }