private static Expression <GetJobIdsFunc> GetJobIdsExpression(QueuedJobPredicate predicate) => (DbContext context, string queue, int from, int perPage) => ( from x in context.Set <HangfireQueuedJob>().Where(predicate) where x.Queue == queue orderby x.Id ascending select x.Id). Skip(from). Take(perPage);
private static Expression <GetCountFunc> GetCountExpression(QueuedJobPredicate predicate) => (DbContext context, string queue) => context.Set <HangfireQueuedJob>(). Where(predicate). Where(x => x.Queue == queue). LongCount();