DbExpressionBuilder.Any Method

 

Creates a new DbExpression that determines whether the specified set argument is non-empty.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAny(DbExpression)

Creates a new DbExpression that determines whether the specified set argument is non-empty.

System_CAPS_pubmethodSystem_CAPS_staticAny(DbExpression, Func<DbExpression, DbExpression>)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for any element of the input set.

System_CAPS_pubmethodSystem_CAPS_staticAny(DbExpressionBinding, DbExpression)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for any element of the input set.


DbExpressionBuilder.Any Method (DbExpression)

Creates a new DbExpression that determines whether the specified set argument is non-empty.

public static DbExpression Any(
	this DbExpression source
)

Parameters

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

An expression that specifies the input set.

Return Value

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

A new DbNotExpression applied to a new DbIsEmptyExpression with the specified argument.

Exception Condition
ArgumentNullException

source is null.

ArgumentException

source does not have a collection result type.


DbExpressionBuilder.Any Method (DbExpression, Func<DbExpression, DbExpression>)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for any element of the input set.

public static DbQuantifierExpression Any(
	this DbExpression source,
	Func<DbExpression, DbExpression> predicate
)

Parameters

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

An expression that specifies the input set.

predicate
Type: System.Func<DbExpression, DbExpression>

A method representing the predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic.

Return Value

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

A new DbQuantifierExpression that represents the Any operation.

Exception Condition
ArgumentNullException

The source or predicate is null.

ArgumentNullException

The expression produced by predicate is null.

ArgumentException

The source does not have a collection result type.

ArgumentException

The expression produced by predicate does not have a Boolean result type.


DbExpressionBuilder.Any Method (DbExpressionBinding, DbExpression)

Creates a new DbQuantifierExpression that determines whether the given predicate holds for any element of the input set.

public static DbQuantifierExpression Any(
	this DbExpressionBinding input,
	DbExpression predicate
)

Parameters

input
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding

An expression binding that specifies the input set.

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

An expression representing a predicate to evaluate for each member of the input set.

Return Value

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

A new DbQuantifierExpression that represents the Any operation.

Exception Condition
ArgumentNullException

The input or predicate is null.

ArgumentException

The predicate does not have a Boolean result type.