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); }
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); }