RelationalConnection.BeginTransactionAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
BeginTransactionAsync(CancellationToken) |
异步启动新事务。 |
BeginTransactionAsync(IsolationLevel, CancellationToken) |
异步启动新事务。 |
BeginTransactionAsync(CancellationToken)
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- 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)
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- RelationalConnection.cs
- Source:
- 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 任务完成时要观察的 。
返回
表示异步操作的任务。 任务结果包含新创建的事务。