Browse Source

Use GetQueryableAsync in RepositoryAsyncExtensions

pull/6994/head
Halil İbrahim Kalkan 5 years ago
parent
commit
197878ae8a
  1. 5
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryAsyncExtensions.cs

5
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryAsyncExtensions.cs

@ -12,13 +12,14 @@ namespace Volo.Abp.Domain.Repositories
{
#region Contains
public static Task<bool> ContainsAsync<T>(
public static async Task<bool> ContainsAsync<T>(
[NotNull] this IReadOnlyRepository<T> repository,
[NotNull] T item,
CancellationToken cancellationToken = default)
where T : class, IEntity
{
return repository.AsyncExecuter.ContainsAsync(repository, item, cancellationToken);
var queryable = await repository.GetQueryableAsync();
return await repository.AsyncExecuter.ContainsAsync(queryable, item, cancellationToken);
}
#endregion

Loading…
Cancel
Save