public async Task <ActionResult <PaginatedItem <TEntity> > > GetAllItems([FromQuery] Criterion criterion) { criterion = criterion ?? new Criterion(); return(await QueryRepository.QueryAsync(criterion, entity => entity)); }