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(), }); }
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 }); }
public static TacNghiepInfo ToIfNotNullDataInfo(this TacNghiep entity) { return(entity?.ToDataInfo()); }
public static TacNghiepResult ToIfNotNullDataResult(this TacNghiep entity) { return(entity?.ToDataResult()); }