Correct naming of ApiScopeRepository.GetByName method.

The method was implementation like FindByName, this commit will correct its name.
pull/10053/head
PM Extra 3 years ago
parent f216fc3093
commit c042354353

@ -8,7 +8,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes
{
public interface IApiScopeRepository : IBasicRepository<ApiScope, Guid>
{
Task<ApiScope> GetByNameAsync(
Task<ApiScope> FindByNameAsync(
string scopeName,
bool includeDetails = true,
CancellationToken cancellationToken = default

@ -18,7 +18,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes
{
}
public async Task<ApiScope> GetByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default)
public async Task<ApiScope> FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.OrderBy(x=>x.Id)

@ -20,7 +20,7 @@ namespace Volo.Abp.IdentityServer.MongoDB
{
}
public async Task<ApiScope> GetByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default)
public async Task<ApiScope> FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default)
{
return await (await GetMongoQueryableAsync(cancellationToken))
.Where(x => x.Name == scopeName)

@ -121,7 +121,7 @@ namespace Volo.Abp.IdentityServer.Cache
await _resourceStore.FindApiScopesByNameAsync(testApiScopeNames);
(await _apiScopeCache.GetAsync(testApiScopeName)).ShouldNotBeNull();
var testApiScope = await _apiScopeRepository.GetByNameAsync(testApiScopeName);
var testApiScope = await _apiScopeRepository.FindByNameAsync(testApiScopeName);
await _apiScopeRepository.DeleteAsync(testApiScope);
(await _apiScopeCache.GetAsync(testApiScopeName)).ShouldBeNull();

@ -111,7 +111,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer
private async Task<ApiScope> CreateApiScopeAsync(string name)
{
var apiScope = await _apiScopeRepository.GetByNameAsync(name);
var apiScope = await _apiScopeRepository.FindByNameAsync(name);
if (apiScope == null)
{
apiScope = await _apiScopeRepository.InsertAsync(

@ -111,7 +111,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer
private async Task<ApiScope> CreateApiScopeAsync(string name)
{
var apiScope = await _apiScopeRepository.GetByNameAsync(name);
var apiScope = await _apiScopeRepository.FindByNameAsync(name);
if (apiScope == null)
{
apiScope = await _apiScopeRepository.InsertAsync(

Loading…
Cancel
Save