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