Ejemplo n.º 1
0
 public static async ValueTask <TEntity> GetById <TEntity, TKey>(this ISingleEntityStore <TEntity, TKey> store, TKey id, CancellationToken cancellationToken = default)
     where TEntity : IEntity <TKey>
 {
     return(await store.GetById(new[] { id }, cancellationToken)
            .ConfigureAwait(false));
 }
Ejemplo n.º 2
0
 public static async ValueTask <TEntity> GetById <TEntity>(this ISingleEntityStore <TEntity> store, Guid id, CancellationToken cancellationToken = default)
     where TEntity : IEntity
 {
     return(await GetById <TEntity, Guid>(store, id, cancellationToken)
            .ConfigureAwait(false));
 }