Executes the query, converting the first record to the specified type.
public ValueTask<T> QuerySingleOrDefaultAsync<T>(CancellationToken cancellationToken = default)
Returns default(T)
if no records are returned. Throws InvalidOperationException if more than one record is returned.
Executes the query, converting the first record to the specified type with the specified delegate.
public ValueTask<T> QuerySingleOrDefaultAsync<T>(Func<IDataRecord, T> map,
CancellationToken cancellationToken = default)
Returns default(T)
if no records are returned. Throws InvalidOperationException if more than one record is returned.