DbExpressionBuilder.GetRefKey Method (DbExpression)

 

Creates a new DbRefKeyExpression that retrieves the key values of the specified reference in structural form.

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

public static DbRefKeyExpression GetRefKey(
	this DbExpression argument
)

Parameters

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

The expression that provides the reference. This expression must have a reference Type with an Entity element type.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbRefKeyExpression

A new DbRefKeyExpression that retrieves the key values of the specified reference.

Exception Condition
ArgumentNullException

argument is null.

ArgumentException

argument does not have an entity result type.