SqlHelper..::..ExecuteScalarAsync Method (SqlConnection, String, array<Object>[]()[][])
Execute a stored procedure via a SqlCommand (that returns a 1x1 resultset) against the specified SqlConnection
using the provided parameter values. This method will query the database to discover the parameters for the
stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.
Namespace:
CoreAssembly: Core (in Core.dll)
Syntax
public static Task<Object> ExecuteScalarAsync( SqlConnection connection, string spName, params Object[] parameterValues )
Parameters
- connection
- Type: SqlConnection
A valid SqlConnection
- spName
- Type: String
The name of the stored procedure
- parameterValues
- Type: array<Object>[]()[][]
An array of objects to be assigned as the input values of the stored procedure