共用方式為


RelationalConnection.BeginTransactionAsync 方法

定義

多載

BeginTransactionAsync(CancellationToken)

以非同步方式開始新的交易。

BeginTransactionAsync(IsolationLevel, CancellationToken)

以非同步方式開始新的交易。

BeginTransactionAsync(CancellationToken)

來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs

以非同步方式開始新的交易。

public virtual System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction> BeginTransactionAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member BeginTransactionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
override this.BeginTransactionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
Public Overridable Function BeginTransactionAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

參數

cancellationToken
CancellationToken

CancellationToken等候工作完成時要觀察的 。

傳回

代表非同步作業的工作。 工作結果包含新建立的交易。

實作

例外狀況

適用於

BeginTransactionAsync(IsolationLevel, CancellationToken)

來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs
來源:
RelationalConnection.cs

以非同步方式開始新的交易。

public virtual System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction> BeginTransactionAsync (System.Data.IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken = default);
abstract member BeginTransactionAsync : System.Data.IsolationLevel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
override this.BeginTransactionAsync : System.Data.IsolationLevel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
Public Overridable Function BeginTransactionAsync (isolationLevel As IsolationLevel, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

參數

isolationLevel
IsolationLevel

要用於交易的隔離等級。

cancellationToken
CancellationToken

CancellationToken等候工作完成時要觀察的 。

傳回

代表非同步作業的工作。 工作結果包含新建立的交易。

實作

例外狀況

適用於