SqlHelper.ExecuteAsync method (1 of 3)
namespace: Serenity.Data assembly: Serenity.Net.Services
Executes the specified query on the connection asynchronously.
public static Task ExecuteAsync(this SqlInsert query, IDbConnection connection,
ILogger logger = null, CancellationToken cancellationToken = default(CancellationToken))
| parameter | description |
|---|---|
| query | The query. |
| connection | The connection. |
| logger | The logger. |
| cancellationToken | The cancellation token. |
Return Value
A task that represents the asynchronous operation.
See Also
SqlHelper.ExecuteAsync method (2 of 3)
namespace: Serenity.Data assembly: Serenity.Net.Services
Executes the specified delete query on the connection asynchronously and returns the number of affected rows.
public static Task<int> ExecuteAsync(this SqlDelete query, IDbConnection connection,
ExpectedRows expectedRows = ExpectedRows.One, ILogger logger = null,
CancellationToken cancellationToken = default(CancellationToken))
| parameter | description |
|---|---|
| query | The query. |
| connection | The connection. |
| expectedRows | The expected rows. Used to validate the expected number of affected rows. |
| logger | The logger. |
| cancellationToken | The cancellation token. |
Return Value
A task that represents the asynchronous operation. The task result contains the number of affected rows.
See Also
- class SqlDelete
- enum ExpectedRows
- class SqlHelper
SqlHelper.ExecuteAsync method (3 of 3)
namespace: Serenity.Data assembly: Serenity.Net.Services
Executes the specified update query on the connection asynchronously and returns the number of affected rows.
public static Task<int> ExecuteAsync(this SqlUpdate query, IDbConnection connection,
ExpectedRows expectedRows = ExpectedRows.One, ILogger logger = null,
CancellationToken cancellationToken = default(CancellationToken))
| parameter | description |
|---|---|
| query | The query. |
| connection | The connection. |
| expectedRows | The expected rows. Used to validate the expected number of affected rows. |
| logger | The logger. |
| cancellationToken | The cancellation token. |
Return Value
A task that represents the asynchronous operation. The task result contains the number of affected rows.
See Also
- class SqlUpdate
- enum ExpectedRows
- class SqlHelper