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 SqlHelper.Execute(SqlDelete/SqlUpdate/SqlInsert) method. Command textParametersThe query.Expected rowsTrue if InsertAndGetID is called |
| ExecuteReader(…) | Intercepts SqlHelper.ExecuteReader method. |
| ExecuteScalar(…) | Intercepts SqlHelper.ExecuteReader method. |
See Also
- Source: ISqlOperationInterceptor.cs