@@ -14,20 +14,17 @@ public class BaseAzureTableRepository<TId, TItem> : BaseRepository<TId, TItem>
14
14
where TId : TableId
15
15
where TItem : class , IItem < TId > , ITableEntity , new ( )
16
16
{
17
- private readonly ILogger _logger ;
18
17
private readonly AzureTableAdapter < TItem > _tableAdapter ;
19
18
20
- public BaseAzureTableRepository ( ILogger logger , AzureTableRepositoryOptions options )
19
+ public BaseAzureTableRepository ( ILogger logger , AzureTableRepositoryOptions options ) : base ( logger )
21
20
{
22
- _logger = logger ;
23
-
24
21
if ( string . IsNullOrEmpty ( options . ConnectionString ) )
25
22
{
26
- _tableAdapter = new AzureTableAdapter < TItem > ( options . TableStorageCredentials , options . TableStorageUri ) ;
23
+ _tableAdapter = new AzureTableAdapter < TItem > ( logger , options . TableStorageCredentials , options . TableStorageUri ) ;
27
24
}
28
25
else
29
26
{
30
- _tableAdapter = new AzureTableAdapter < TItem > ( options . ConnectionString ) ;
27
+ _tableAdapter = new AzureTableAdapter < TItem > ( logger , options . ConnectionString ) ;
31
28
}
32
29
}
33
30
@@ -314,12 +311,12 @@ protected override async Task<int> CountAsyncInternal(CancellationToken token =
314
311
return count ;
315
312
}
316
313
317
- protected override async Task < int > CountAsyncInternal ( Expression < Func < TItem , bool > > predicate , CancellationToken token = default )
314
+ protected override async Task < int > CountAsyncInternal ( Expression < Func < TItem , bool > > [ ] predicates , CancellationToken token = default )
318
315
{
319
316
var count = 0 ;
320
317
321
318
await foreach ( var item in _tableAdapter
322
- . Query < DynamicTableEntity > ( new [ ] { predicate } , selectExpression : item => new DynamicTableEntity ( item . PartitionKey , item . RowKey ) ,
319
+ . Query < DynamicTableEntity > ( predicates , selectExpression : item => new DynamicTableEntity ( item . PartitionKey , item . RowKey ) ,
323
320
cancellationToken : token ) )
324
321
{
325
322
count ++ ;
0 commit comments