Table of Contents

Class CypherParameterMappingAttribute

Namespace
Neo4j.Driver.Mapping
Assembly
Neo4j.Driver.dll

Overrides the Cypher parameter name used when the containing object is passed as a query parameter.

[AttributeUsage(AttributeTargets.Property)]
public class CypherParameterMappingAttribute : MappingBindingsAttribute, IMappingBindingMutator
Inheritance
CypherParameterMappingAttribute
Implements
Inherited Members
Extension Methods

Remarks

When a C# object is passed as a parameter to a Cypher query, property names are used as the parameter key names by default. Apply this attribute to use a different key for a specific property.

This attribute controls the object-to-parameter direction (C# → Cypher). It is unrelated to the record-to-object direction. To control how a record field is mapped to a property during result reading, use MappingSourceAttribute instead.

If TranslateIdentifiers(bool) has been called with translateCypherParameters: true, names are translated automatically and this attribute is only needed to override specific properties that should not follow the global convention.

Constructors

CypherParameterMappingAttribute(string)

Initializes the attribute with the Cypher parameter key name to use for this property.