ConnectionExtensions.SetCommandTimeout method
namespace: Serenity.Data assembly: Serenity.Net.Data
Sets the default command timeout for given connection. Only works with IHasCommandTimeout (WrappedConnection) instances, which are usually created by SqlConnections.NewXyz methods.
public static void SetCommandTimeout(this IDbConnection connection, int? timeout)
| parameter | description |
|---|---|
| connection | The connection. |
| timeout | The timeout value. |
Exceptions
| exception | condition |
|---|---|
| ArgumentOutOfRangeException | Connection is not a WrappedConnection. |
See Also
- class ConnectionExtensions