GetByIdAsync Method
Definition
- Namespace
- Savvyio.Extensions.EFCore.Domain.EventSourcing
- Assemblies
- Savvyio.Extensions.EFCore.Domain.EventSourcing.dll
GetByIdAsync(TKey, Action<AsyncOptions>)
Loads an aggregate from the specified id asynchronous.
public Task<TEntity> GetByIdAsync(TKey id, Action<AsyncOptions> setup = null)
Parameters
idTKeyThe key that uniquely identifies the aggregate.
setupAction<AsyncOptions>The AsyncOptions which may be configured.
Returns
- Task<TEntity>
A Task<TResult> that represents the asynchronous operation. The task result either contains the entity of the operation or
nullif not found.
Exceptions
- MissingMethodException
TEntitydoes not have a suitable constructor.