다음을 통해 공유


RelationalDatabaseFacadeExtensions.UseTransactionAsync 메서드

정의

오버로드

UseTransactionAsync(DatabaseFacade, DbTransaction, CancellationToken)

DbTransaction 데이터베이스 작업에서 사용할 을 DbContext설정합니다.

UseTransactionAsync(DatabaseFacade, DbTransaction, Guid, CancellationToken)

DbTransaction 데이터베이스 작업에서 사용할 을 DbContext설정합니다.

UseTransactionAsync(DatabaseFacade, DbTransaction, CancellationToken)

DbTransaction 데이터베이스 작업에서 사용할 을 DbContext설정합니다.

public static System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction> UseTransactionAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction?> UseTransactionAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction? transaction, System.Threading.CancellationToken cancellationToken = default);
static member UseTransactionAsync : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.Common.DbTransaction * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
<Extension()>
Public Function UseTransactionAsync (databaseFacade As DatabaseFacade, transaction As DbTransaction, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

매개 변수

databaseFacade
DatabaseFacade

DatabaseFacade 컨텍스트에 대한 입니다.

transaction
DbTransaction

사용할 DbTransaction입니다.

cancellationToken
CancellationToken

CancellationToken 작업이 완료 될 때까지 기다리는 동안 관찰할 입니다.

반환

Task 지정된 트랜잭션에 대한 를 IDbContextTransaction 포함하는 입니다.

예외

설명

자세한 내용 및 예제는 EF Core의 트랜잭션 을 참조하세요.

적용 대상

UseTransactionAsync(DatabaseFacade, DbTransaction, Guid, CancellationToken)

DbTransaction 데이터베이스 작업에서 사용할 을 DbContext설정합니다.

public static System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction> UseTransactionAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction transaction, Guid transactionId, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction?> UseTransactionAsync (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction? transaction, Guid transactionId, System.Threading.CancellationToken cancellationToken = default);
static member UseTransactionAsync : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.Common.DbTransaction * Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction>
<Extension()>
Public Function UseTransactionAsync (databaseFacade As DatabaseFacade, transaction As DbTransaction, transactionId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDbContextTransaction)

매개 변수

databaseFacade
DatabaseFacade

DatabaseFacade 컨텍스트에 대한 입니다.

transaction
DbTransaction

사용할 DbTransaction입니다.

transactionId
Guid

트랜잭션의 고유 식별자입니다.

cancellationToken
CancellationToken

CancellationToken 작업이 완료 될 때까지 기다리는 동안 관찰할 입니다.

반환

Task 지정된 트랜잭션에 대한 를 IDbContextTransaction 포함하는 입니다.

예외

설명

자세한 내용 및 예제는 EF Core의 트랜잭션 을 참조하세요.

적용 대상