Table of Contents

GetByIdAsync Method

Definition

GetByIdAsync(TKey, Action<AsyncOptions>)

Loads an aggregate from the specified id asynchronous.

public Task<TEntity> GetByIdAsync(TKey id, Action<AsyncOptions> setup = null)

Parameters

id TKey

The key that uniquely identifies the aggregate.

setup Action<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 null if not found.

Exceptions

MissingMethodException

TEntity does not have a suitable constructor.