public static ICypherFluentQuery MatchQuerry(this ICypherFluentQuery cypher, string varialbeName, BaseNode node) { if (node is Person) { return(cypher.MatchQuerry(varialbeName, (Person)node)); } if (node is Commit) { return(cypher.MatchQuerry(varialbeName, (Commit)node)); } if (node is File) { return(cypher.MatchQuerry(varialbeName, (File)node)); } if (node is AstElement) { return(cypher.MatchQuerry(varialbeName, (AstElement)node)); } if (node is AstElementDeleted) { return(cypher.MatchQuerry(varialbeName, (AstElementDeleted)node)); } string matchClause = "(" + varialbeName + ":" + node.GetType().Name + ")"; if (node.Id > 0) { return(cypher.Match(matchClause).Where(varialbeName + ".Id=" + node.Id)); } throw new NotImplementedException("Needs a specialices MatchQuery for " + node.GetType().Name); }