Method ToImmutableArray
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
ToImmutableArray<T>(IMappedQuery<T>)
Reads every mapped row into a new ImmutableArray<T>.
public static ImmutableArray<T> ToImmutableArray<T>(this IMappedQuery<T> query)
Parameters
queryIMappedQuery<T>The query to execute.
Returns
- ImmutableArray<T>
An immutable array of all the rows, in the order the database returned them.
Type Parameters
TThe type each row is mapped to.
Remarks
All rows are buffered in memory before the call returns. Use Read(Action<IEnumerable<T>>) to process very large results as a stream.
- See Also
-
ToArray<T>(IMappedQuery<T>)