Click or drag to resize

ResultCursorExtensionsSingleAsync Method (IResultCursor)

Return the only record in the result stream.

Namespace:  Neo4j.Driver
Assembly:  Neo4j.Driver (in Neo4j.Driver.dll) Version: 4.1.0
Syntax
public static Task<IRecord> SingleAsync(
	this IResultCursor result
)

Parameters

result
Type: Neo4j.DriverIResultCursor
The result stream

Return Value

Type: TaskIRecord
The only record in the result stream.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IResultCursor. 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).
Remarks
Throws if the result contains more than one record or the result is empty.
See Also