public static AdministratedQuestion MapDomainToDao(AdministratedQuestionBusiness domain)
        {
            var returned = new AdministratedQuestion
            {
                Id   = domain.Id,
                Text = domain.Text,
                AdministratedTestId  = domain.AdministratedTestId,
                AdministratedAnswers = domain.AdministratedAnswers.Select(AdministratedAnswerMapper.MapDomainToDao).ToList()
            };

            return(returned);
        }
        public static AdministratedQuestionBusiness MapDaoToDomain(AdministratedQuestion dao)
        {
            var returned = new AdministratedQuestionBusiness
            {
                Id   = dao.Id,
                Text = dao.Text,
                AdministratedTestId  = dao.AdministratedTestId,
                AdministratedAnswers = dao.AdministratedAnswers.Select(AdministratedAnswerMapper.MapDaoToDomain).ToList()
            };

            return(returned);
        }
Ejemplo n.º 3
0
 public AdministratedQuestionDto(AdministratedQuestionBusiness administratedQuestion)
 {
     Id   = administratedQuestion.Id;
     Text = administratedQuestion.Text;
     AdministratedAnswers = administratedQuestion.AdministratedAnswers.Select(a => new AdministratedAnswerDto(a));
 }