diff --git a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs index a16ccc00..2fa5a4db 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs @@ -312,14 +312,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public virtual Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -486,7 +486,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -501,7 +501,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs index 428000b2..f718916c 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs @@ -237,14 +237,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public virtual Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -339,7 +339,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -354,7 +354,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs index 14198606..84b7fa2f 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs @@ -156,14 +156,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public virtual Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -176,7 +176,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -191,7 +191,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs index a67f547e..f97de828 100644 --- a/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs +++ b/src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs @@ -294,14 +294,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public virtual Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -513,7 +513,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -528,7 +528,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/IOpenIddictApplicationStore.cs b/src/OpenIddict.Core/Stores/IOpenIddictApplicationStore.cs index 43157bc3..c8a2a055 100644 --- a/src/OpenIddict.Core/Stores/IOpenIddictApplicationStore.cs +++ b/src/OpenIddict.Core/Stores/IOpenIddictApplicationStore.cs @@ -117,14 +117,14 @@ namespace OpenIddict.Core Task> FindByRedirectUriAsync([NotNull] string address, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); @@ -208,7 +208,7 @@ namespace OpenIddict.Core Task> GetRedirectUrisAsync([NotNull] TApplication application, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -220,7 +220,7 @@ namespace OpenIddict.Core Task> ListAsync([CanBeNull] int? count, [CanBeNull] int? offset, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs b/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs index 6b54e6df..7d02ddc6 100644 --- a/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs +++ b/src/OpenIddict.Core/Stores/IOpenIddictAuthorizationStore.cs @@ -107,14 +107,14 @@ namespace OpenIddict.Core Task GetApplicationIdAsync([NotNull] TAuthorization authorization, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); @@ -163,7 +163,7 @@ namespace OpenIddict.Core Task GetTypeAsync([NotNull] TAuthorization authorization, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -175,7 +175,7 @@ namespace OpenIddict.Core Task> ListAsync([CanBeNull] int? count, [CanBeNull] int? offset, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/IOpenIddictScopeStore.cs b/src/OpenIddict.Core/Stores/IOpenIddictScopeStore.cs index e8745c68..22b3d760 100644 --- a/src/OpenIddict.Core/Stores/IOpenIddictScopeStore.cs +++ b/src/OpenIddict.Core/Stores/IOpenIddictScopeStore.cs @@ -72,19 +72,19 @@ namespace OpenIddict.Core Task DeleteAsync([NotNull] TScope scope, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -96,7 +96,7 @@ namespace OpenIddict.Core Task> ListAsync([CanBeNull] int? count, [CanBeNull] int? offset, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/IOpenIddictTokenStore.cs b/src/OpenIddict.Core/Stores/IOpenIddictTokenStore.cs index 56f4430b..51c871c0 100644 --- a/src/OpenIddict.Core/Stores/IOpenIddictTokenStore.cs +++ b/src/OpenIddict.Core/Stores/IOpenIddictTokenStore.cs @@ -136,14 +136,14 @@ namespace OpenIddict.Core Task GetApplicationIdAsync([NotNull] TToken token, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); @@ -247,7 +247,7 @@ namespace OpenIddict.Core Task GetTokenTypeAsync([NotNull] TToken token, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -259,7 +259,7 @@ namespace OpenIddict.Core Task> ListAsync([CanBeNull] int? count, [CanBeNull] int? offset, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/OpenIddictApplicationStore.cs b/src/OpenIddict.Core/Stores/OpenIddictApplicationStore.cs index ef80e777..25c02062 100644 --- a/src/OpenIddict.Core/Stores/OpenIddictApplicationStore.cs +++ b/src/OpenIddict.Core/Stores/OpenIddictApplicationStore.cs @@ -261,14 +261,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public abstract Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); @@ -426,7 +426,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -458,7 +458,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs index 551745ce..0d7ec91c 100644 --- a/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs +++ b/src/OpenIddict.Core/Stores/OpenIddictAuthorizationStore.cs @@ -179,14 +179,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public abstract Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); @@ -262,7 +262,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -294,7 +294,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/OpenIddictScopeStore.cs b/src/OpenIddict.Core/Stores/OpenIddictScopeStore.cs index be1c61e9..7600a95b 100644 --- a/src/OpenIddict.Core/Stores/OpenIddictScopeStore.cs +++ b/src/OpenIddict.Core/Stores/OpenIddictScopeStore.cs @@ -81,19 +81,19 @@ namespace OpenIddict.Core public abstract Task DeleteAsync([NotNull] TScope scope, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public abstract Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -125,7 +125,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.Core/Stores/OpenIddictTokenStore.cs b/src/OpenIddict.Core/Stores/OpenIddictTokenStore.cs index 0030bbb0..b60738a9 100644 --- a/src/OpenIddict.Core/Stores/OpenIddictTokenStore.cs +++ b/src/OpenIddict.Core/Stores/OpenIddictTokenStore.cs @@ -221,14 +221,14 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public abstract Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken); @@ -443,7 +443,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The number of results to return. /// The number of results to skip. @@ -475,7 +475,7 @@ namespace OpenIddict.Core } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs index 4ab82b72..ae1e81df 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs @@ -227,14 +227,14 @@ namespace OpenIddict.EntityFramework } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -243,11 +243,11 @@ namespace OpenIddict.EntityFramework throw new ArgumentNullException(nameof(query)); } - return query(Applications).SingleOrDefaultAsync(cancellationToken); + return query(Applications).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs index 2b713ae9..a081f839 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs @@ -240,14 +240,14 @@ namespace OpenIddict.EntityFramework } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -256,11 +256,11 @@ namespace OpenIddict.EntityFramework throw new ArgumentNullException(nameof(query)); } - return query(Authorizations).SingleOrDefaultAsync(cancellationToken); + return query(Authorizations).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs index be2047f3..56997071 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs @@ -151,14 +151,14 @@ namespace OpenIddict.EntityFramework } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -167,11 +167,11 @@ namespace OpenIddict.EntityFramework throw new ArgumentNullException(nameof(query)); } - return query(Scopes).SingleOrDefaultAsync(cancellationToken); + return query(Scopes).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs index 824afbf1..ccd7c221 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs @@ -224,14 +224,14 @@ namespace OpenIddict.EntityFramework } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -240,7 +240,7 @@ namespace OpenIddict.EntityFramework throw new ArgumentNullException(nameof(query)); } - return query(Tokens).SingleOrDefaultAsync(cancellationToken); + return query(Tokens).FirstOrDefaultAsync(cancellationToken); } /// @@ -276,7 +276,7 @@ namespace OpenIddict.EntityFramework } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs index 7b25dc40..95d47f64 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs @@ -208,14 +208,14 @@ namespace OpenIddict.EntityFrameworkCore } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -224,11 +224,11 @@ namespace OpenIddict.EntityFrameworkCore throw new ArgumentNullException(nameof(query)); } - return query(Applications).SingleOrDefaultAsync(cancellationToken); + return query(Applications).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs index 8aa0fc3e..1982c00e 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs @@ -231,14 +231,14 @@ namespace OpenIddict.EntityFrameworkCore } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -247,11 +247,11 @@ namespace OpenIddict.EntityFrameworkCore throw new ArgumentNullException(nameof(query)); } - return query(Authorizations).SingleOrDefaultAsync(cancellationToken); + return query(Authorizations).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs index a0083164..16e07e8b 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs @@ -151,14 +151,14 @@ namespace OpenIddict.EntityFrameworkCore } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -167,11 +167,11 @@ namespace OpenIddict.EntityFrameworkCore throw new ArgumentNullException(nameof(query)); } - return query(Scopes).SingleOrDefaultAsync(cancellationToken); + return query(Scopes).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute. diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs index f642e975..f421aff7 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs @@ -241,14 +241,14 @@ namespace OpenIddict.EntityFrameworkCore } /// - /// Executes the specified query. + /// Executes the specified query and returns the first element. /// /// The result type. /// The query to execute. /// The that can be used to abort the operation. /// /// A that can be used to monitor the asynchronous operation, - /// whose result returns the single element returned when executing the specified query. + /// whose result returns the first element returned when executing the query. /// public override Task GetAsync([NotNull] Func, IQueryable> query, CancellationToken cancellationToken) { @@ -257,11 +257,11 @@ namespace OpenIddict.EntityFrameworkCore throw new ArgumentNullException(nameof(query)); } - return query(Tokens).SingleOrDefaultAsync(cancellationToken); + return query(Tokens).FirstOrDefaultAsync(cancellationToken); } /// - /// Executes the specified query. + /// Executes the specified query and returns all the corresponding elements. /// /// The result type. /// The query to execute.