SqlServerRetryingExecutionStrategy 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SqlServerRetryingExecutionStrategy(DbContext)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext)
參數
- context
- DbContext
將叫用作業的內容。
備註
使用最大重試計數的預設值 6,以及使用預設延遲上限的 30 秒。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyContext)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext context);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As ExecutionStrategyContext)
參數
- context
- ExecutionStrategyContext
必要的相依性。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies)
參數
- dependencies
- ExecutionStrategyDependencies
包含服務相依性的參數物件。
備註
使用最大重試計數的預設值 6,以及使用預設延遲上限的 30 秒。
適用於
SqlServerRetryingExecutionStrategy(DbContext, Int32)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext * int -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext, maxRetryCount As Integer)
參數
- context
- DbContext
將叫用作業的內容。
- maxRetryCount
- Int32
重試嘗試的次數上限。
備註
使用預設延遲上限的預設值 30 秒。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyContext, Int32)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext context, int maxRetryCount);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext * int -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As ExecutionStrategyContext, maxRetryCount As Integer)
參數
- context
- ExecutionStrategyContext
必要的相依性。
- maxRetryCount
- Int32
重試嘗試的次數上限。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, IEnumerable<Int32>)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, System.Collections.Generic.IEnumerable<int> errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * seq<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, errorNumbersToAdd As IEnumerable(Of Integer))
參數
- dependencies
- ExecutionStrategyDependencies
包含服務相依性的參數物件。
- errorNumbersToAdd
- IEnumerable<Int32>
其他應視為暫時性的 SQL 錯誤號碼。
備註
使用最大重試計數的預設值 6,以及使用預設延遲上限的 30 秒。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * int -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, maxRetryCount As Integer)
參數
- dependencies
- ExecutionStrategyDependencies
包含服務相依性的參數物件。
- maxRetryCount
- Int32
重試嘗試的次數上限。
備註
使用預設延遲上限的預設值 30 秒。
適用於
SqlServerRetryingExecutionStrategy(DbContext, Int32, TimeSpan, ICollection<Int32>)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int> errorNumbersToAdd);
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext * int * TimeSpan * System.Collections.Generic.ICollection<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))
參數
- context
- DbContext
將叫用作業的內容。
- maxRetryCount
- Int32
重試嘗試的次數上限。
- maxRetryDelay
- TimeSpan
重試之間的延遲上限。
- errorNumbersToAdd
- ICollection<Int32>
其他應視為暫時性的 SQL 錯誤號碼。
適用於
SqlServerRetryingExecutionStrategy(DbContext, Int32, TimeSpan, IEnumerable<Int32>)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.IEnumerable<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext * int * TimeSpan * seq<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As IEnumerable(Of Integer))
參數
- context
- DbContext
將叫用作業的內容。
- maxRetryCount
- Int32
重試嘗試的次數上限。
- maxRetryDelay
- TimeSpan
重試之間的延遲上限。
- errorNumbersToAdd
- IEnumerable<Int32>
其他應視為暫時性的 SQL 錯誤號碼。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyContext, Int32, TimeSpan, ICollection<Int32>)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int> errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext * int * TimeSpan * System.Collections.Generic.ICollection<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As ExecutionStrategyContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))
參數
- context
- ExecutionStrategyContext
必要的相依性。
- maxRetryCount
- Int32
重試嘗試的次數上限。
- maxRetryDelay
- TimeSpan
重試之間的延遲上限,以毫秒為單位。
- errorNumbersToAdd
- ICollection<Int32>
其他應視為暫時性的 SQL 錯誤號碼。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32, TimeSpan, ICollection<Int32>)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int> errorNumbersToAdd);
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * int * TimeSpan * System.Collections.Generic.ICollection<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))
參數
- dependencies
- ExecutionStrategyDependencies
包含服務相依性的參數物件。
- maxRetryCount
- Int32
重試嘗試的次數上限。
- maxRetryDelay
- TimeSpan
重試之間的延遲上限。
- errorNumbersToAdd
- ICollection<Int32>
其他應視為暫時性的 SQL 錯誤號碼。
適用於
SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32, TimeSpan, IEnumerable<Int32>)
建立 SqlServerRetryingExecutionStrategy 的新執行個體。
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.IEnumerable<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * int * TimeSpan * seq<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As IEnumerable(Of Integer))
參數
- dependencies
- ExecutionStrategyDependencies
包含服務相依性的參數物件。
- maxRetryCount
- Int32
重試嘗試的次數上限。
- maxRetryDelay
- TimeSpan
重試之間的延遲上限。
- errorNumbersToAdd
- IEnumerable<Int32>
其他應視為暫時性的 SQL 錯誤號碼。