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
FilterExpressioncancellationToken
CancellationToken
Returns
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
QueryLayercancellationToken
CancellationToken
Returns
- Task<IReadOnlyCollection<TResource>>