DbExpressionBuilder.Invoke Method (EdmFunction, IEnumerable<DbExpression>)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a new DbFunctionExpression representing the invocation of the specified function with the given arguments.

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

public static DbFunctionExpression Invoke(
	this EdmFunction function,
	IEnumerable<DbExpression> arguments


Type: System.Data.Metadata.Edm.EdmFunction

Metadata for the function to invoke.

Type: System.Collections.Generic.IEnumerable<DbExpression>

A list of expressions that provide the arguments to the function.

Return Value

Type: System.Data.Common.CommandTrees.DbFunctionExpression

A new DbFunctionExpression representing the function invocation.

Exception Condition

function is null, or arguments is null or contains null.


The count of arguments does not equal the number of parameters declared by function, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding function parameter type.

.NET Framework
Available since 4.5
Return to top