SqlHelper.ExecuteScalar method (1 of 2)
namespace: Serenity.Data assembly: Serenity.Net.Services
Executes the statement returning a scalar value.
public static object ExecuteScalar(IDbConnection connection, SqlQuery query, ILogger logger = null)
| parameter | description |
|---|---|
| connection | The connection. |
| query | The select query. |
| logger | Logger |
Return Value
Scalar value
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | selectQuery is null |
See Also
SqlHelper.ExecuteScalar method (2 of 2)
namespace: Serenity.Data assembly: Serenity.Net.Services
Executes the statement returning a scalar value.
public static object ExecuteScalar(IDbConnection connection, string commandText,
IDictionary<string, object> param = null, ILogger logger = null)
| parameter | description |
|---|---|
| connection | The connection. |
| commandText | The command text. |
| param | The parameters. |
| logger | Logger |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | connection |
See Also
- class SqlHelper