/// <summary> /// 将entity转换为vo /// </summary> public NoticeExtendedVo ToExtendedVo(NoticeEntity entity) { NoticeExtendedVo vo = new NoticeExtendedVo(); CopyToVo(vo, entity); if (!string.IsNullOrEmpty(entity.Category)) { vo.Category = metaNoticeCategoryProvider.ToMetadata(entity.Category); } return(vo); }
public List <NoticeExtendedVo> ToExtendedVoList(List <NoticeEntity> entityList) { if (entityList == null) { return(null); } List <NoticeExtendedVo> voList = new List <NoticeExtendedVo>(); foreach (NoticeEntity entity in entityList) { NoticeExtendedVo vo = ToExtendedVo(entity); voList.Add(vo); } return(voList); }