Beispiel #1
0
        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));
        }
Beispiel #2
0
        /// <summary>
        /// Executes this OPathQuery against an ObjectSpace data store and returns an ObjectSet filled with the results.
        /// </summary>
        /// <param name="os">ObjectSpace instance to use.</param>
        /// <param name="parameters">Parameter values to use when executing the query.</param>
        /// <returns>An ObjectSet filled with objects retrieved from the data store.</returns>
        public ObjectSet <T> GetObjectSet(ObjectSpace os, params object[] parameters)
        {
            CompiledQuery <T> cq = this.Compile(os);

            return(os.GetObjectSet <T>(cq, parameters));
        }