コード例 #1
0
 public static TacNghiepInfo ToDataInfo(this TacNghiep entity)
 {
     return(new TacNghiepInfo
     {
         Id = entity.Id,
         NoiDung = entity.NoiDung,
         NgayTao = entity.NgayTao,
         NgayHoanThanh = entity.NgayHoanThanh,
         NgayHetHan = entity.NgayHetHan,
         LinhVucTacNghiepInfo = entity.LinhVucTacNghiep.ToIfNotNullDataInfo(),
     });
 }
コード例 #2
0
 public static TacNghiepResult ToDataResult(this TacNghiep entity)
 {
     return(new TacNghiepResult
     {
         Id = entity.Id,
         LinhVucTacNghiepId = entity.LinhVucTacNghiepId,
         LinhVucTacNghiepInfo = entity.LinhVucTacNghiep.ToIfNotNullDataInfo(),
         NgayHetHan = entity.NgayHetHan,
         NgayHoanThanh = entity.NgayHoanThanh,
         NgayTao = entity.NgayTao,
         NoiDung = entity.NoiDung,
         NoiDungTraoDoi = entity.NoiDungTraoDoi,
         MucDoHoanThanhId = entity.MucDoHoanThanhId,
         CoQuanInfos = entity.TacNghiep_TinhHinhThucHien.Select(x => new CoQuanInfo {
             Id = x.CoQuanId, Name = x.CoQuan.Ten, NhomCoQuanId = x.CoQuan.NhomCoQuanId, MucDoHoanThanhId = x.MucDoHoanThanhId
         }).ToList(),
         CreateDate = entity.CreateDate,
         CreatedBy = entity.CreatedBy,
         IsDeleted = entity.IsDeleted,
         LastUpdated = entity.LastUpdated,
         LastUpdatedBy = entity.LastUpdatedBy
     });
 }
コード例 #3
0
 public static TacNghiepInfo ToIfNotNullDataInfo(this TacNghiep entity)
 {
     return(entity?.ToDataInfo());
 }
コード例 #4
0
 public static TacNghiepResult ToIfNotNullDataResult(this TacNghiep entity)
 {
     return(entity?.ToDataResult());
 }