Share via


DbExpressionBuilder.Navigate Method

Definition

Overloads

Navigate(DbExpression, RelationshipEndMember, RelationshipEndMember)

Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.

Navigate(RelationshipType, String, String, DbExpression)

Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.

Navigate(DbExpression, RelationshipEndMember, RelationshipEndMember)

Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.

public static System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression Navigate (this System.Data.Entity.Core.Common.CommandTrees.DbExpression navigateFrom, System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember fromEnd, System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember toEnd);
static member Navigate : System.Data.Entity.Core.Common.CommandTrees.DbExpression * System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember * System.Data.Entity.Core.Metadata.Edm.RelationshipEndMember -> System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression
<Extension()>
Public Function Navigate (navigateFrom As DbExpression, fromEnd As RelationshipEndMember, toEnd As RelationshipEndMember) As DbRelationshipNavigationExpression

Parameters

navigateFrom
DbExpression

An expression that specifies the instance from which navigation should occur.

fromEnd
RelationshipEndMember

Metadata for the property that represents the end of the relationship from which navigation should occur.

toEnd
RelationshipEndMember

Metadata for the property that represents the end of the relationship to which navigation should occur.

Returns

A new DbRelationshipNavigationExpression representing the navigation of the specified from and to relation ends of the specified relation type from the specified navigation source instance.

Exceptions

fromEnd, toEnd or navigateFrom is null.

fromEnd and toEnd are not declared by the same relationship type, or navigateFrom has a result type that is not compatible with the property type of fromEnd.

Applies to

Navigate(RelationshipType, String, String, DbExpression)

Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.

public static System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression Navigate (this System.Data.Entity.Core.Metadata.Edm.RelationshipType type, string fromEndName, string toEndName, System.Data.Entity.Core.Common.CommandTrees.DbExpression navigateFrom);
static member Navigate : System.Data.Entity.Core.Metadata.Edm.RelationshipType * string * string * System.Data.Entity.Core.Common.CommandTrees.DbExpression -> System.Data.Entity.Core.Common.CommandTrees.DbRelationshipNavigationExpression
<Extension()>
Public Function Navigate (type As RelationshipType, fromEndName As String, toEndName As String, navigateFrom As DbExpression) As DbRelationshipNavigationExpression

Parameters

type
RelationshipType

Metadata for the relation type that represents the relationship.

fromEndName
String

The name of the property of the relation type that represents the end of the relationship from which navigation should occur.

toEndName
String

The name of the property of the relation type that represents the end of the relationship to which navigation should occur.

navigateFrom
DbExpression

An expression the specifies the instance from which naviagtion should occur.

Returns

A new DbRelationshipNavigationExpression representing the navigation of the specified from and to relation ends of the specified relation type from the specified navigation source instance.

Exceptions

type, fromEndName, toEndName or navigateFrom is null.

type is not associated with this command tree's metadata workspace or navigateFrom is associated with a different command tree, or type does not declare a relation end property with name toEndName or fromEndName, or navigateFrom has a result type that is not compatible with the property type of the relation end property with name fromEndName.

Applies to