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. |
exception | condition |
---|---|
ArgumentOutOfRangeException | Connection is not a WrappedConnection. |
- class ConnectionExtensions