Export (0) Print
Expand All

DbExpressionBuilder.Property Method (DbExpression, NavigationProperty)

.NET Framework 4.5

Creates a new DbPropertyExpression representing the retrieval of the specified navigation property.

Namespace:  System.Data.Common.CommandTrees.ExpressionBuilder
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public static DbPropertyExpression Property(
	this DbExpression instance,
	NavigationProperty navigationProperty


Type: System.Data.Common.CommandTrees.DbExpression

The instance from which to retrieve the navigation property.

Type: System.Data.Metadata.Edm.NavigationProperty

Metadata for the navigation property to retrieve.

Return Value

Type: System.Data.Common.CommandTrees.DbPropertyExpression
A new DbPropertyExpression representing the navigation property retrieval.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DbExpression. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


navigationProperty or instance is null.

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft