Table of Contents

Interface IApplicationSaveChangesPipeline

Namespace
ProjectTemplate.Infrastructure.Data
Assembly
ProjectTemplate.Infrastructure.dll

Defines the application-owned EF Core save preparation pipeline.

public interface IApplicationSaveChangesPipeline

Methods

ApplyAfterSaveChanges(ApplicationDbContext)

Completes application save handling after EF Core persists tracked changes.

bool ApplyAfterSaveChanges(ApplicationDbContext dbContext)

Parameters

dbContext ApplicationDbContext

The current application database context.

Returns

bool

true when additional audit records were appended; otherwise, false.

ApplyAfterSaveChangesAsync(ApplicationDbContext, CancellationToken)

Completes application save handling after EF Core asynchronously persists tracked changes.

ValueTask<bool> ApplyAfterSaveChangesAsync(ApplicationDbContext dbContext, CancellationToken cancellationToken = default)

Parameters

dbContext ApplicationDbContext

The current application database context.

cancellationToken CancellationToken

A token that can cancel the operation.

Returns

ValueTask<bool>

true when additional audit records were appended; otherwise, false.

ApplyBeforeSaveChanges(ApplicationDbContext)

Applies application save preparation before EF Core persists tracked changes.

bool ApplyBeforeSaveChanges(ApplicationDbContext dbContext)

Parameters

dbContext ApplicationDbContext

The current application database context.

Returns

bool

true when tracked changes should be persisted; otherwise, false.

ApplyBeforeSaveChangesAsync(ApplicationDbContext, CancellationToken)

Applies application save preparation before EF Core asynchronously persists tracked changes.

ValueTask<bool> ApplyBeforeSaveChangesAsync(ApplicationDbContext dbContext, CancellationToken cancellationToken = default)

Parameters

dbContext ApplicationDbContext

The current application database context.

cancellationToken CancellationToken

A token that can cancel the operation.

Returns

ValueTask<bool>

true when tracked changes should be persisted; otherwise, false.