public static void SaveUserAnswer(this QZ_StudentQuizAnswers entity, QZ_QuestionAnswerOptions option) { entity.AnswerText = option.OptionText; entity.OptionId = option.OptionId; entity.IsCorrect = option.IsCorrect; entity.UpdateDate = DateTime.Now; }
public static StudentAnswerToken Entity2StudentAnswerToken(this QZ_StudentQuizAnswers entity) { return(new StudentAnswerToken { AttemptId = entity.AttemptId , AnswerId = entity.AnswerId , Answer = entity.AnswerText , Question = entity.QuestionText , IsCorrect = entity.IsCorrect , Score = entity.Score }); }