Add `orderby` and `take`.

pull/15402/head
maliming 3 years ago
parent 8848e3ef56
commit 6253049066
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4

@ -89,6 +89,6 @@ public class EfCoreOpenIddictAuthorizationRepository : EfCoreRepository<IOpenIdd
where authorization.CreationDate < date
where authorization.Status != OpenIddictConstants.Statuses.Valid ||
(authorization.Type == OpenIddictConstants.AuthorizationTypes.AdHoc && authorizationToken == null)
select authorization).ToListAsync(cancellationToken: cancellationToken);
select authorization).OrderBy(x => x.Id).Take(count).ToListAsync(cancellationToken: cancellationToken);
}
}

@ -77,6 +77,8 @@ public class MongoOpenIddictAuthorizationRepository : MongoDbRepository<OpenIddi
.Where(x => x.CreationDate < date)
.Where(x => x.Status != OpenIddictConstants.Statuses.Valid ||
(x.Type == OpenIddictConstants.AuthorizationTypes.AdHoc && !tokens.Contains(x.Id)))
.OrderBy(x => x.Id)
.Take(count)
.ToListAsync(cancellationToken: cancellationToken);
}
}

Loading…
Cancel
Save