Interface IReadableRepository<TEntity, TKey>
- Namespace
- Savvyio.Domain
- Assembly
- Savvyio.Core.dll
Defines a generic way of abstracting readable repositories (cRud).
public interface IReadableRepository<TEntity, TKey> : IRepository<TEntity, TKey> where TEntity : class, IIdentity<TKey>
Type Parameters
TEntity
The type of the entity.
TKey
The type of the key that uniquely identifies the entity.
Methods
GetByIdAsync(TKey, Action<AsyncOptions>)
Loads the entity from the specified id
asynchronous.
Task<TEntity> GetByIdAsync(TKey id, Action<AsyncOptions> setup = null)
Parameters
id
TKeyThe key that uniquely identifies the entity.
setup
Action<AsyncOptions>The AsyncOptions which may be configured.
Returns
- Task<TEntity>
A System.Threading.Tasks.Task<TResult> that represents the asynchronous operation. The task result either contains the entity of the operation or
null
if not found.
See Also
IRepository<TEntity, TKey>