GetEntityRef Method

DbExpressionBuilder.GetEntityRef Method (DbExpression)

.NET Framework (current version)
 

Creates a new DbEntityRefExpression that retrieves the ref of the specifed entity in structural form.

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

public static DbEntityRefExpression GetEntityRef(
	this DbExpression argument
)

Parameters

argument
Type: System.Data.Common.CommandTrees.DbExpression

The expression that provides the entity. This expression must have an entity result type.

Return Value

Type: System.Data.Common.CommandTrees.DbEntityRefExpression

A new DbEntityRefExpression that retrieves a reference to the specified entity.

Exception Condition
ArgumentNullException

argument is null.

ArgumentException

argument does not have an entity result type.

.NET Framework
Available since 4.5
Return to top
Show:
© 2016 Microsoft