# Class Extensions OptimaJet.Workflow.DbPersistence.Extensions Namespace: [OptimaJet.Workflow.DbPersistence](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/) ```csharp public static class Extensions ``` ## Methods `public static bool IsDeadLockException(this Exception exception)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `exception` | `Exception` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public static bool CanRepeatQuery(this Exception exception)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `exception` | `Exception` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | `public static PersistenceProviderQueryException ToQueryException(this Exception exception, bool suppressRetry = false)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `exception` | `Exception` | | | `suppressRetry` | `Boolean` | | ### Returns | Type | Description | | --- | --- | | `PersistenceProviderQueryException` | | `public static bool IsDuplicateKeyException(this PersistenceProviderQueryException exception)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `exception` | `PersistenceProviderQueryException` | | ### Returns | Type | Description | | --- | --- | | `Boolean` | | [Previous DbObject](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/DbObject-TEntity/) [Next FileSchemePersistenceMSSQLProvider](https://api.workflowengine.io/sql-server/OptimaJet.Workflow.DbPersistence/FileSchemePersistenceMSSQLProvider/)