DbExtensions.GetValueAsync<TValue> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value with the given .
public static System.Threading.Tasks.Task<TValue> GetValueAsync<TValue> (this System.Data.Common.DbDataReader record, string fieldName, System.Threading.CancellationToken cancellationToken = default);
static member GetValueAsync : System.Data.Common.DbDataReader * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
<Extension()>
Public Function GetValueAsync(Of TValue) (record As DbDataReader, fieldName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TValue)
Type Parameters
- TValue
The type of value to retrieve.
Parameters
- record
- DbDataReader
The record from which to retrieve the value.
- fieldName
- String
The name of the field.
- cancellationToken
- CancellationToken
The cancellation token. Defaults to None.
Returns
Task<TValue>
Value in the given field indicated by .
Exceptions
Remarks
This function throws if the given does not exist.