DbExpressionBuilder.Navigate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.
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:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbRelationshipNavigationExpression ^ Navigate(System::Data::Common::CommandTrees::DbExpression ^ navigateFrom, System::Data::Metadata::Edm::RelationshipEndMember ^ fromEnd, System::Data::Metadata::Edm::RelationshipEndMember ^ toEnd);
public static System.Data.Common.CommandTrees.DbRelationshipNavigationExpression Navigate (this System.Data.Common.CommandTrees.DbExpression navigateFrom, System.Data.Metadata.Edm.RelationshipEndMember fromEnd, System.Data.Metadata.Edm.RelationshipEndMember toEnd);
static member Navigate : System.Data.Common.CommandTrees.DbExpression * System.Data.Metadata.Edm.RelationshipEndMember * System.Data.Metadata.Edm.RelationshipEndMember -> System.Data.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
.
Remarks
DbRelationshipNavigationExpression requires that navigation always occur from a reference, and so navigateFrom
must always have a reference result type.
Applies to
Navigate(RelationshipType, String, String, DbExpression)
Creates a new DbRelationshipNavigationExpression representing the navigation of a composition or association relationship.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbRelationshipNavigationExpression ^ Navigate(System::Data::Metadata::Edm::RelationshipType ^ type, System::String ^ fromEndName, System::String ^ toEndName, System::Data::Common::CommandTrees::DbExpression ^ navigateFrom);
public static System.Data.Common.CommandTrees.DbRelationshipNavigationExpression Navigate (this System.Data.Metadata.Edm.RelationshipType type, string fromEndName, string toEndName, System.Data.Common.CommandTrees.DbExpression navigateFrom);
static member Navigate : System.Data.Metadata.Edm.RelationshipType * string * string * System.Data.Common.CommandTrees.DbExpression -> System.Data.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 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
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
.
Remarks
DbRelationshipNavigationExpression requires that navigation always occur from a reference, and so navigateFrom
must always have a reference result type.