public static IQueryable<Job> FilterPermissions(this JobTableModel model, IQueryable<Job> Jobs, AuthorizationToken Authorization) { var allowedTypes = FilterAllowedTypes(Authorization); if (allowedTypes != null) { return Jobs.Where(j => allowedTypes.Contains(j.JobTypeId)); } return Jobs; }