I am new both to Neo4J and C#. I copied a simple HelloWorld example, but from what I can tell it doesn't even connect to the DB. Initially I tried with the correct username/pwd/port, but when I saw that the create statement doesn't seem to be executed I tried with the wrong pwd/port hoping to see a DB connect error that would at least confirm that with correct credentials it did connect, but I get no error with the wrong credentials, which is confusing. Neo4J is started and I can execute queries in the Neo4J Browser. Any help would be appreciated. The code is below. Thank you for your time.
public async Task CreateNode(){
Console.WriteLine("CreateNode");
//IDriver driver = GraphDatabase.Driver("neo4j://localhost:7687", AuthTokens.Basic("neo4j", "pwd"));
IDriver driver = GraphDatabase.Driver("bolt://localhost:7687", AuthTokens.Basic("neo4j", ""));
IAsyncSession session = driver.AsyncSession(o => o.WithDatabase("neo4j"));
try
{
Console.WriteLine("before run ");
IResultCursor cursor = await session.RunAsync("CREATE (person:Person {name: 'Fooo'})");
Console.WriteLine("after run");
await cursor.ConsumeAsync();
}
finally
{
await session.CloseAsync();
}
await driver.CloseAsync();
}