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(); }
public void Insert(DetailModel item) { Detail detail = new Detail { QuestionId = item.Question.QuestionId, TestId = item.TestId, }; _detailRepo.Insert(detail); item.DetailId = detail.DetailId; }
public static DetailModel Reduce(this FullDetailModel from) { DetailModel to = new DetailModel(); Reduce(from, to); return to; }