SqlHelper.Execute method (1 of 3)

namespace: Serenity.Data   assemblySerenity.Net.Services

Executes the specified query on connection.

public static void Execute(this SqlInsert query, IDbConnection connection, ILogger logger = null)
parameter description
query The query.
connection The connection.
logger Logger

See Also


SqlHelper.Execute method (2 of 3)

namespace: Serenity.Data   assemblySerenity.Net.Services

Executes the specified delete query on connection and returns number of affected rows.

public static int Execute(this SqlDelete query, IDbConnection connection, 
    ExpectedRows expectedRows = ExpectedRows.One, ILogger logger = null)
parameter description
query The query.
connection The connection.
expectedRows The expected rows. Used to validate expected number of affected rows.
logger Logger

Return Value

Number of affected rows.

See Also


SqlHelper.Execute method (3 of 3)

namespace: Serenity.Data   assemblySerenity.Net.Services

Executes the specified update query on connection and returns number of affected rows.

public static int Execute(this SqlUpdate query, IDbConnection connection, 
    ExpectedRows expectedRows = ExpectedRows.One, ILogger logger = null)
parameter description
query The query.
connection The connection.
expectedRows The expected rows. Used to validate expected number of affected rows.
logger Logger

Return Value

Number of affected rows.

See Also