Created
May 20, 2014 14:24
-
-
Save contensis/27962ae00fb47a2e981b to your computer and use it in GitHub Desktop.
How to create a query with an AND clause in the Web API Search.
This file contains 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
@using Contensis.Framework.Web | |
@using Contensis.Framework.Web.Search | |
<h1>Search Example</h1> | |
@{ | |
// Queries can be easily chained. | |
var query = Query.Where("MD_ShowOnFrontPage").IsEqualTo("1").And("Property_DateCreated").IsGreaterThan("'12 Oct 2011'"); | |
var nodes = new NodeFinder().Find(query); | |
} | |
<ul> | |
@foreach(var node in nodes) | |
{ | |
<li>@node.Title</li> | |
} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment