Table of Contents

Method AsObjectsAsync

Namespace
Neo4j.Driver.Mapping
Assembly
Neo4j.Driver.dll

AsObjectsAsync<T>(IAsyncEnumerable<IRecord>, CancellationToken)

Converts the IAsyncEnumerable<T> to an IAsyncEnumerable<T> of objects of type T, by mapping each record in the enumerable to an object. If no custom mapper is defined for type T, the default mapper will be used.

public static IAsyncEnumerable<T> AsObjectsAsync<T>(this IAsyncEnumerable<IRecord> asyncEnumerable, CancellationToken cancellationToken = default)

Parameters

asyncEnumerable IAsyncEnumerable<IRecord>

The asynchronous source of records.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

IAsyncEnumerable<T>

An IAsyncEnumerable of the mapped objects.

Type Parameters

T

The type of object to map to.