Export (0) Print
Expand All

SqlCommand.ExecuteScalarAsync Method

.NET Framework 4.5

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method ExecuteScalarAsync() An asynchronous version of ExecuteScalar, which executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.Invokes ExecuteScalarAsync with CancellationToken.None. (Inherited from DbCommand.)
Public method ExecuteScalarAsync(CancellationToken) An asynchronous version of ExecuteScalar, which executes the query asynchronously and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object. (Overrides DbCommand.ExecuteScalarAsync(CancellationToken).)
Top
Show:
© 2014 Microsoft