2013-07-16 63 views
0

暗號我有一個看起來像這樣的暗號查詢:使用「和」在Neo4jClient

start n = node:node_auto_index(Department = "IT") match (n)-->(x) Where x.Name = "Mike" And x.Occupation = "Developer" return x; 

這將返回相關的根節點的所有節點,如果叫邁克的職業是開發商。

現在我該如何做C#中的「和x.Occupation」?

var query = this.clientConnection 
     .Cypher 
     .Start(new 
     { 
     n = Node.ByIndexLookup("node_auto_index", "Department", "IT") 
     }) 
     .Match("n-->x") 
     .Where((Employee x) => x.Name == "Version" //"AND" x.Occupation = "Developer) 
     .Return<Node<IQS_Content_Manager.Models.Nodes.Version>>("(x)") 
     .Results; 

queryResult = query.ToList(); 

回答

2
.Where((Employee x) => x.Name == "Version") 
.AndWhere((Employee x) => x.Occupation == "Developer)