Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-24-2021 12:49 AM
Hi All
Please could someone help with the correct syntax for using the Neo4j.Driver for DotNet in F#.
In C# I have this approach working well:
var _driver = GraphDatabase.Driver("bolt://:"
, AuthTokens.Basic("", "<password")
, builder => builder.WithEncryptionLevel(EncryptionLevel.Encrypted));
var session = _driver.AsyncSession();
In F# I am battling to do the 'builder' part
let _driver = GraphDatabase.Driver (":"
, AutTokens.Basic("", ""
, ?????)
Help greatly appreciated.
Darryl
01-31-2021 07:18 AM
Hi!
Have you tried with the following?
let _driver = GraphDatabase.Driver ("neo4j://localhost:7687", AuthTokens.Basic("neo4j", "neo"), fun b ->b.WithEncryptionLevel(EncryptionLevel.None) |> ignore)
The |> ignore
is necessary because the builder methods return an instance of the builder object, so there is a mismatch of the signature expected by the Driver
method and the one you might be passing.
All the sessions of the conference are now available online