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
TResourceThe resource type.
TIdThe 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
filterFilterExpressioncancellationTokenCancellationToken
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
queryLayerQueryLayercancellationTokenCancellationToken
Returns
- Task<IReadOnlyCollection<TResource>>