Esempio n. 1
0
 public static NguonDeThiDTO FromEntity(NguonDeThi item)
 {
     return(new NguonDeThiDTO()
     {
         Id = item.Id,
         DeThiId = item.DeThiId,
         KhoCauHoiId = item.KhoCauHoiId,
         DeThi = item.DeThi != null?DeThiDTO.FromEntity(item.DeThi) : null,
                     KhoCauHoi = item.KhoCauHoi != null?KhoCauHoiDTO.FromEntity(item.KhoCauHoi) : null,
     });
 }
Esempio n. 2
0
 public static CauHoiDTO FromEntity(CauHoi item)
 {
     return(new CauHoiDTO()
     {
         Id = item.Id,
         TenCauHoi = item.TenCauHoi,
         KyHieu = item.KyHieu,
         MoTa = item.MoTa,
         TienTo = item.TienTo,
         HauTo = item.HauTo,
         DangCauHoiId = item.DangCauHoiId,
         KhoCauHoiId = item.KhoCauHoiId,
         MucDoId = item.MucDoId,
         GiaTriDapAn = item.GiaTriDapAn,
         DangCauHoi = item.DangCauHoi != null?DangCauHoiDTO.FromEntity(item.DangCauHoi) : null,
                          KhoCauHoi = item.KhoCauHoi != null?KhoCauHoiDTO.FromEntity(item.KhoCauHoi) : null,
                                          MucDo = item.MucDo != null?MucDoDTO.FromEntity(item.MucDo) : null,
                                                      DapAnCauHoi = item.DapAnCauHoi?.Select(DapAnCauHoiDTO.FromEntity),
     });
 }