public static AdvancedArticleContainer GetAdvancedArticleContainerByNodeID(int nodeID, string lang) { ObjectSpace os = GetObjectSpace(false); ObjectSet ol = os.GetObjectSet(new OPathQuery(typeof(AdvancedArticle), "NodeID==" + nodeID + " && Lang=='" + lang + "'", "Lang,Rank,Version")); AdvancedArticlePageCollection aapc = new AdvancedArticlePageCollection(); foreach (AdvancedArticle aa in ol) { aapc.Add(aa); } return(new AdvancedArticleContainer(nodeID, lang, aapc)); }
public AdvancedArticleContainer(int nodeID, string lang, AdvancedArticlePageCollection pages) { NodeID = nodeID; Lang = lang; Pages = pages; }