Example #1
0
 public static void Reduce(this FullDetailModel from, DetailModel to)
 {
     to.DetailId = from.DetailId;
     to.TestId = from.TestId;
     to.Question = from.Question.Reduce();
     to.Choices = from.Choices.Reduce();
 }
Example #2
0
        public void Insert(DetailModel item)
        {
            Detail detail = new Detail
            {
                QuestionId = item.Question.QuestionId,
                TestId = item.TestId,
            };

            _detailRepo.Insert(detail);
            item.DetailId = detail.DetailId;
        }
Example #3
0
 public static DetailModel Reduce(this FullDetailModel from)
 {
     DetailModel to = new DetailModel();
     Reduce(from, to);
     return to;
 }