Browse Source

Remove unnecessary GetCountAsync methods.

pull/2441/head
Halil İbrahim Kalkan 7 years ago
parent
commit
7967b24284
  1. 4
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs
  2. 6
      modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs

4
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentityRoleRepository.cs

@ -21,9 +21,5 @@ namespace Volo.Abp.Identity
bool includeDetails = false, bool includeDetails = false,
CancellationToken cancellationToken = default CancellationToken cancellationToken = default
); );
Task<long> GetCountAsync(
CancellationToken cancellationToken = default
);
} }
} }

6
modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs

@ -43,11 +43,5 @@ namespace Volo.Abp.Identity.MongoDB
.PageBy<IdentityRole, IMongoQueryable<IdentityRole>>(skipCount, maxResultCount) .PageBy<IdentityRole, IMongoQueryable<IdentityRole>>(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken)); .ToListAsync(GetCancellationToken(cancellationToken));
} }
public async Task<long> GetCountAsync(CancellationToken cancellationToken = default)
{
return await GetMongoQueryable()
.LongCountAsync(GetCancellationToken(cancellationToken));
}
} }
} }
Loading…
Cancel
Save