ISqlOperationInterceptor interface
namespace: Serenity.Data assembly: Serenity.Net.Services
An interface that makes it possible to intercept basic SQL operations on connections (e.g. SqlHelper extensions) mostly for testing purposes. Note that this does not intercept all SQL operations, only the ones that are done through SqlHelper extensions. It does not intercept Dapper operations, for example. This interface should be implemented by the mock connection class used in tests.
public interface ISqlOperationInterceptor
Members
| name | description |
|---|---|
| ExecuteNonQuery(…) | Intercepts the SqlHelperExecute method (SqlDelete/SqlUpdate/SqlInsert). |
| ExecuteNonQueryAsync(…) | Intercepts the async SqlHelperExecute methods (SqlDelete/SqlUpdate/SqlInsert). The default implementation forwards to ExecuteNonQuery. |
| ExecuteReader(…) | Intercepts the SqlHelperExecuteReader method. |
| ExecuteReaderAsync(…) | Intercepts the async SqlHelperExecuteReader methods. The default implementation forwards to ExecuteReader. |
| ExecuteScalar(…) | Intercepts the SqlHelperExecuteScalar method. |
| ExecuteScalarAsync(…) | Intercepts the async SqlHelperExecuteScalar methods. The default implementation forwards to ExecuteScalar. |
See Also
- Source: ISqlOperationInterceptor.cs