public static DocumentNavigationTreeViewModels MapFromBOStatic(Documentation_BO bo) { if (bo == null) { return(null); } else { DocumentNavigationTreeViewModels ret = new DocumentNavigationTreeViewModels(); ret.Id = bo.Id; ret.TitlePageVN = bo.TitlePageVN; ret.TitlePageEN = bo.TitlePageEN; ret.MetaDescriptionVN = bo.MetaDescriptionVN; ret.MetaDescriptionEN = bo.MetaDescriptionEN; ret.TitleVN = bo.TitleVN; ret.TitleEN = bo.TitleEN; ret.ImageAvatarUrlVN = bo.ImageAvatarUrlVN; ret.ImageAvatarUrlEN = bo.ImageAvatarUrlEN; ret.DescriptionVN = bo.DescriptionVN; ret.DescriptionEN = bo.DescriptionEN; ret.ContentVN = bo.ContentVN; ret.ContentEN = bo.ContentEN; ret.RoutingVN = bo.RoutingVN; ret.RoutingEN = bo.RoutingEN; ret.Category = bo.Category; ret.DisplayOrder = bo.DisplayOrder; ret.PageComponent = bo.PageComponent; ret.IsActive = bo.IsActive; ret.ParentId = bo.ParentId; ret.Level = bo.Level; ret.IsLeaf = bo.IsLeaf; return(ret); } }
public static IList <DocumentNavigationTreeViewModels> MapFromBOs(IList <Documentation_BO> bos) { IList <DocumentNavigationTreeViewModels> apiObjs = new List <DocumentNavigationTreeViewModels>(); foreach (var bo in bos) { DocumentNavigationTreeViewModels apiObj = new DocumentNavigationTreeViewModels(); apiObj.MapFromBO(bo); apiObjs.Add(apiObj); } return(apiObjs); }