Created
April 7, 2015 14:06
-
-
Save ps-team/e958ddf9c04555a614b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newsArticleQuery = Query.Where("SC_T_ID").IsEqualTo("-1234”); // only return news articles based on template ID | |
var newsQuery = newsArticleQuery; //this is so we can add a subquery | |
if (!String.IsNullOrEmpty(category)) | |
{ | |
var categorySubQuery = SubQuery.Where("Md_Category").IsEqualTo(category); | |
newsQuery = newsQuery.AndSubQuery(categorySubQuery ); | |
} | |
var finalQuery = new NodeFinder().Find(newsQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment