public static BossCommentEntity ToEntity(this BossComment item) { if (null == item) { return(null); } var entInfo = EntInfo.FindById(item.CommentEntId); var entity = new BossCommentEntity(item, entInfo); return(entity); }
public static IList <BossCommentEntity> ToEntities(this IList <BossComment> items) { if (items == null || items.Count < 1) { return(null); } var result = new List <BossCommentEntity>(); foreach (var item in items) { var entInfo = EntInfo.FindById(item.CommentEntId); result.Add(new BossCommentEntity(item, entInfo)); } return(result); }