Table of Contents

Interface IResourceReadRepository<TResource, TId>

Namespace
JsonApiDotNetCore.Repositories
Assembly
JsonApiDotNetCore.dll

Groups read operations.

[PublicAPI]
public interface IResourceReadRepository<TResource, in TId> where TResource : class, IIdentifiable<in TId>

Type Parameters

TResource

The resource type.

TId

The resource identifier type.

Methods

CountAsync(FilterExpression?, CancellationToken)

Executes a read query using the specified filter and returns the count of matching resources.

Task<int> CountAsync(FilterExpression? filter, CancellationToken cancellationToken)

Parameters

filter FilterExpression
cancellationToken CancellationToken

Returns

Task<int>

GetAsync(QueryLayer, CancellationToken)

Executes a read query using the specified constraints and returns the collection of matching resources.

Task<IReadOnlyCollection<TResource>> GetAsync(QueryLayer queryLayer, CancellationToken cancellationToken)

Parameters

queryLayer QueryLayer
cancellationToken CancellationToken

Returns

Task<IReadOnlyCollection<TResource>>