コード例 #1
0
ファイル: FullDetailModel.cs プロジェクト: tmvan/AppServer
 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();
 }
コード例 #2
0
ファイル: DetailBusiness.cs プロジェクト: tmvan/AppServer
        public void Insert(DetailModel item)
        {
            Detail detail = new Detail
            {
                QuestionId = item.Question.QuestionId,
                TestId = item.TestId,
            };

            _detailRepo.Insert(detail);
            item.DetailId = detail.DetailId;
        }
コード例 #3
0
ファイル: FullDetailModel.cs プロジェクト: tmvan/AppServer
 public static DetailModel Reduce(this FullDetailModel from)
 {
     DetailModel to = new DetailModel();
     Reduce(from, to);
     return to;
 }