SqlSet<TResult>.First Method (String, Object[])

Returns the first element in the set that satisfies a specified condition.

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public TResult First(
	string predicate,
	params Object[] parameters
)

Parameters

predicate

Type: System.String
A SQL expression to test each row for a condition.

parameters

Type: System.Object[]
The parameters to apply to the predicate.

Return Value

Type: TResult
The first element in the set that passes the test in the specified predicate.

Exceptions

Exception Condition
InvalidOperationException No element satisfies the condition in predicate.-or-The set is empty.

See Also

Reference

SqlSet<TResult> Class
DbExtensions Namespace

© Max Toro Q.