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.LinqAssembly: Cassandra (in Cassandra.dll) Version: 3.2.0
Syntax 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:
CqlQuerySingleElementTSourcea 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