Passing a list as a parameter of session.Run in C#

39 views
Skip to first unread message

emmanuel....@checkmarx.com

unread,
Aug 8, 2017, 6:42:52 AM8/8/17
to Neo4j
Hi,

I have a query running something like this:

WITH $values as values
MATCH (n:Node)
WHERE node.value in values

How can I pass a list of values in $values using C#? 

I have tried something like this but it doesn't work:
var records = session.Run("WITH $values as values MATCH (n:Node), WHERE node.value in values", new { values } );
Where values is a C# list of integers.

Thanks,

Michael Hunger

unread,
Aug 8, 2017, 8:32:09 AM8/8/17
to ne...@googlegroups.com
You need to pass a dictionary with a key of "values" and your list as value.

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages