-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
This works.
await session.RunAsync(
"CREATE (a:Person {name: $name})",
new { name = "John" }
);This also works.
await session.RunAsync(
"CREATE (a:Person {name: 'John'})",
conf => conf
.WithTimeout(new TimeSpan(5))
.WithMetadata(new Dictionary<string, object>{ { "appName", "peopleTracker" } })
);This does not.
await session.RunAsync(
"CREATE (a:Person {name: $name})",
new { name = "John" },
conf => conf
.WithTimeout(new TimeSpan(5))
.WithMetadata(new Dictionary<string, object>{ { "appName", "peopleTracker" } })
);and errors with
error CS1503: Argument 2: cannot convert from '<anonymous type: string name>' to 'System.Collections.Generic.IDictionary<string, object>' [/home/stefano/git/docs-testing/drivers/runners/dotnet/example-project/dotnet-neo4j.csproj]
The types don't change across the different signatures, so really a combination of the first two snippets should work wonders.