public static StudentQuizAttemptDTO Entity2StudentQuizAttemptDto(this QZ_StudentAttemptToken entity) { return(new StudentQuizAttemptDTO { AttemptId = entity.AttemptId , IsSuccess = entity.IsSuccess , UserScore = entity.Score , AvailableAttempts = entity.AvailableAttempts , UserAttempts = entity.UserAttempts , HasCertificate = entity.AttachCertificate , IsValid = true , RequestSendOn = entity.RequestSendOn , ResponseSendOn = entity.ResponseSendOn , Author = new BaseUserInfoDTO { UserId = entity.AuthorUserId , Email = entity.AuthorEmail , FullName = entity.Entity2AuthorFullName() } , Quiz = new QuizDTO { QuizId = entity.QuizId , Title = entity.Title , PassPercent = entity.PassPercent , Attempts = entity.Attempts , TimeLimit = entity.TimeLimit , IsMandatory = entity.IsMandatory } }); }
// public static string Entity2AuthorFullName(this QZ_StudentAttemptToken entity) { return(CombineFullName(entity.AuthorFirstName, entity.AuthorLastName, entity.AuthorNickname)); }