Table of Contents

Class EntityFrameworkCoreTransaction

Namespace
JsonApiDotNetCore.AtomicOperations
Assembly
JsonApiDotNetCore.dll

Represents an Entity Framework Core transaction in an atomic:operations request.

[PublicAPI]
public sealed class EntityFrameworkCoreTransaction : IOperationsTransaction, IAsyncDisposable
Inheritance
EntityFrameworkCoreTransaction
Implements
Inherited Members

Constructors

EntityFrameworkCoreTransaction(IDbContextTransaction, DbContext)

public EntityFrameworkCoreTransaction(IDbContextTransaction transaction, DbContext dbContext)

Parameters

transaction IDbContextTransaction
dbContext DbContext

Properties

TransactionId

Identifies the active transaction.

public string TransactionId { get; }

Property Value

string

Methods

AfterProcessOperationAsync(CancellationToken)

Does nothing.

public Task AfterProcessOperationAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

BeforeProcessOperationAsync(CancellationToken)

Detaches all entities from the Entity Framework Core change tracker.

public Task BeforeProcessOperationAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

CommitAsync(CancellationToken)

Commits all changes made to the underlying data store.

public Task CommitAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.