Table of Contents

Interface IFetchCollectionByKeyAction<TKey, TItem>

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

Defines a fetch operation that returns a collection for a given key.

public interface IFetchCollectionByKeyAction<TKey, TItem>

Type Parameters

TKey

The key type used to scope the collection.

TItem

The item type contained in the returned collection.

Remarks

Intended for service interfaces that return a read-only collection scoped by a key.

Methods

FetchAsync(TKey, CancellationToken)

Fetches a collection of items for the given key.

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

Parameters

key TKey

The key used to scope the collection.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult<IReadOnlyList<TItem>>>