Class PetaPocoConnectionExtensions
Provides a set of extension methods adding retry capabilities into the standard System.Data.IDbConnection interface, which is used in PetaPoco.
Inheritance
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public static class PetaPocoConnectionExtensions
Methods
OpenWithRetry(IDbConnection)
Opens a database connection with the connection settings specified in the ConnectionString property of the connection object. Uses the default retry policy when opening the connection.
Declaration
public static void OpenWithRetry(this IDbConnection connection)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IDbConnection | connection | The connection object that is required as per extension method declaration. |
OpenWithRetry(IDbConnection, RetryPolicy)
Opens a database connection with the connection settings specified in the ConnectionString property of the connection object. Uses the specified retry policy when opening the connection.
Declaration
public static void OpenWithRetry(this IDbConnection connection, RetryPolicy retryPolicy)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IDbConnection | connection | The connection object that is required as per extension method declaration. |
RetryPolicy | retryPolicy | The retry policy defining whether to retry a request if the connection fails to be opened. |