DbExpressionBuilder.GetEntityRef Method (DbExpression)

 

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

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

public static DbEntityRefExpression GetEntityRef(
	this DbExpression argument
)

Parameters

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

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

Return Value

Type: System.Data.Entity.Core.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.