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
TKeyThe key type used to locate the entity.
TResultThe 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
keyTKeyThe key used to locate the entity.
cancellationTokenCancellationTokenToken to cancel the operation.
Returns
- Task<DatabaseResult<TResult>>