Method Get
Get<TResult>(IPropertyValues, CancellationToken)
Retrieves a single entity from the database based on the provided property values.
protected virtual Task<TResult> Get<TResult>(IPropertyValues propertyValues, CancellationToken cancellationToken = default) where TResult : class
Parameters
propertyValues
IPropertyValuesThe property values of the entity.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<TResult>
The retrieved entity.
Type Parameters
TResult
The type of the entity to retrieve.
Get<TResult>(IPrimaryKey, CancellationToken)
Retrieves a single entity from the database based on the provided primary keys.
protected virtual Task<TResult> Get<TResult>(IPrimaryKey keys, CancellationToken cancellationToken = default) where TResult : class
Parameters
keys
IPrimaryKeyThe primary keys of the entity.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<TResult>
The retrieved entity.
Type Parameters
TResult
The type of the entity to retrieve.
Get(IPrimaryKey, CancellationToken)
Retrieves a single entity from the database based on the provided primary keys.
public virtual Task<T> Get(IPrimaryKey keys, CancellationToken cancellationToken = default)
Parameters
keys
IPrimaryKeyThe primary keys of the entity.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<T>
The retrieved entity.