Table of Contents

Class SaveOptions

Namespace
eQuantic.Core.Data.Repository.Options
Assembly
eQuantic.Core.Data.dll

Options that control how changes are persisted when a unit of work is committed.

[ExcludeFromCodeCoverage]
public class SaveOptions
Inheritance
SaveOptions
Inherited Members

Methods

GetUserId<TUserKey>()

Gets the acting user identifier previously recorded through WithAuditMetadata<TUserKey>(TUserKey).

public TUserKey GetUserId<TUserKey>()

Returns

TUserKey

The acting user identifier, or the default value when none was recorded.

Type Parameters

TUserKey

The type of the user identifier.

IsAuditMetadata()

Gets a value indicating whether audit metadata should be saved.

public bool IsAuditMetadata()

Returns

bool

true when audit metadata is enabled; otherwise false.

WithAuditMetadata<TUserKey>(TUserKey)

Enables audit metadata and records the acting user identifier.

public SaveOptions WithAuditMetadata<TUserKey>(TUserKey userId)

Parameters

userId TUserKey

The acting user identifier.

Returns

SaveOptions

The same SaveOptions instance for chaining.

Type Parameters

TUserKey

The type of the user identifier.