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
TKeyThe key type used to scope the collection.
TItemThe 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
keyTKeyThe key used to scope the collection.
cancellationTokenCancellationTokenToken to cancel the operation.
Returns
- Task<DatabaseResult<IReadOnlyList<TItem>>>