Click or drag to resize
CqlQueryExtensionsFirstTSource Method (TableTSource, ExpressionFuncTSource, Boolean)
Returns a CqlQuery which after execution returns the first element in a sequence that satisfies a specified condition. To execute this CqlQuery use Execute() method.

Namespace: Cassandra.Data.Linq
Assembly: Cassandra (in Cassandra.dll) Version: 3.0.9 (git 5ca22bb)
Syntax
C#
public static CqlQuerySingleElement<TSource> First<TSource>(
	this Table<TSource> source,
	Expression<Func<TSource, bool>> predicate
)

Parameters

source
Type: Cassandra.Data.LinqTableTSource
The Table<TSource> to return the first element of.
predicate
Type: System.Linq.ExpressionsExpressionFuncTSource, Boolean
A function to test each element for a condition.

Type Parameters

TSource
The type of the elements of source.

Return Value

Type: CqlQuerySingleElementTSource
a CqlQuery<TSource> which after execution will return first element in the sequence that passes the test in the specified predicate function.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also