Table of Contents

Interface IFetchByKeyAction<TKey, TResult>

Namespace
FishMMO.Database.Npgsql.Services.Interfaces.Actions
Assembly
FishMMO-DB.dll

Defines a fetch operation that returns a single result for a given key.

public interface IFetchByKeyAction<TKey, TResult>

Type Parameters

TKey

The key type used to locate the entity.

TResult

The result type returned on success.

Remarks

Intended for service interfaces that expose a simple point-read by key. The key semantics and any filtering (e.g. soft-deleted rows) are defined by the specialized service.

Methods

FetchAsync(TKey, CancellationToken)

Fetches an entity for the given key.

Task<DatabaseResult<TResult>> FetchAsync(TKey key, CancellationToken cancellationToken = default)

Parameters

key TKey

The key used to locate the entity.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult<TResult>>