Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Models Inheritance: System.ObjectSyntax
Summary
Represents a navigation property binding in an entity set.Remarks
Navigation property bindings establish the connection between navigation properties and the entity sets that contain the target entities. They are essential for defining how relationships are resolved in the OData service.Constructors
.ctor
Initializes a new instance of the EdmNavigationPropertyBinding class.Syntax
.ctor
Initializes a new instance of the EdmNavigationPropertyBinding class with the specified path and target.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
path | string | The path of the navigation property. |
target | string | The target entity set name. |
Exceptions
| Exception | Description |
|---|---|
ArgumentException | Thrown when path or target is null or whitespace. |
.ctor Inherited
Inherited from
objectSyntax
Properties
Path
Gets or sets the path of the navigation property.Syntax
Property Value
Type:string
The navigation property path, which may be a simple property name or a more complex path.
Remarks
The path identifies which navigation property this binding applies to. For simple cases, this is just the property name. For more complex scenarios involving inheritance or containment, the path may include type casts or additional segments.Target
Gets or sets the target entity set name.Syntax
Property Value
Type:string
The name of the entity set that contains the target entities for this navigation property.
Remarks
When following this navigation property, the target entities will be found in the entity set specified by this property. The target entity set must be defined in the same entity container.Methods
Equals Override
Determines whether the specified object is equal to the current navigation property binding.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | The object to compare with the current navigation property binding. |
Returns
Type:bool
true if the specified object is equal to the current navigation property binding; otherwise, false.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Override
Returns a hash code for the current navigation property binding.Syntax
Returns
Type:int
A hash code for the current navigation property binding.
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Override
Returns a string representation of the navigation property binding.Syntax
Returns
Type:string
A string showing the path and target relationship.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?