Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Configuring the API and ICypherSession

Mark Tranter edited this page Sep 24, 2013 · 3 revisions

As it stands, Cypher.Net has almost no configuration. Only the URL of your server endpoint is required.

   ISessionConfiguration sessionConfiguration = Fluently.Configure("http://localhost:7474/db/data/");

The ISessionConfiguration interface contains one method CreateSessionFactory(). This method returns a factory object used to create ICypherSession objects, which look a little something like this:

    public interface ICypherSession
    {
        Node GetNode(long id);

        Node CreateNode(object properties);
        Node CreateNode(object properties, string label);
        
        void Delete(Node node);
        void Delete(long nodeId);
        void Save(Node node);

        ICypherQueryStart<TVariables> BeginQuery<TVariables>();
        ICypherQueryStart<TVariables> BeginQuery<TVariables>(Expression<Func<ICypherPrototype, TVariables>> variablePrototype);
    }
Clone this wiki locally