@@ -6,39 +6,52 @@ public CoreDatabase(DbContext dbContext) : base(dbContext)
66 {
77 }
88
9- public async Task < int > GetCountAsync ( )
10- {
11- var result = await DbContext . Set < TEntity > ( )
12- . AsNoTracking ( )
13- . ToListAsync ( ) ;
9+ // public async Task<int> GetCountAsync()
10+ // {
11+ // var result = await DbContext.Set<TEntity>()
12+ // .AsNoTracking()
13+ // .ToListAsync();
1414
15- return result . Count ;
16- }
15+ // return result.Count;
16+ // }
1717
18- public async Task < List < TEntity > > GetOrderByIdAscendingAsync ( )
19- {
20- return await DbContext . Set < TEntity > ( )
21- . OrderBy ( x => x . Id )
22- . AsNoTracking ( )
23- . ToListAsync ( ) ;
24- }
18+ // public async Task<List<TEntity>> GetOrderByIdAscendingAsync()
19+ // {
20+ // return await DbContext.Set<TEntity>()
21+ // .OrderBy(x => x.Id)
22+ // .AsNoTracking()
23+ // .ToListAsync();
24+ // }
2525
26- public async Task < List < TEntity > > GetOrderByIdDescendingAsync ( )
27- {
28- return await DbContext . Set < TEntity > ( )
29- . OrderByDescending ( x => x . Id )
30- . AsNoTracking ( )
31- . ToListAsync ( ) ;
32- }
26+ // public async Task<List<TEntity>> GetOrderByIdDescendingAsync()
27+ // {
28+ // return await DbContext.Set<TEntity>()
29+ // .OrderByDescending(x => x.Id)
30+ // .AsNoTracking()
31+ // .ToListAsync();
32+ // }
3333
34- public async Task < ListViewModel < TEntity > > GetListPaginationAsync ( int pageIndex , int pageSize )
35- {
36- var result = await DbContext . Set < TEntity > ( )
37- . Skip ( ( pageIndex - 1 ) * pageSize )
38- . Take ( pageSize )
39- . AsNoTracking ( )
40- . ToListAsync ( ) ;
34+ // public async Task<ListViewModel<TEntity>> GetListPaginationAsync(int pageIndex, int pageSize)
35+ // {
36+ // var result = await DbContext.Set<TEntity>()
37+ // .Skip((pageIndex - 1) * pageSize)
38+ // .Take(pageSize)
39+ // .AsNoTracking()
40+ // .ToListAsync();
4141
42- return new ListViewModel < TEntity > { Results = result , TotalCount = result . Count } ;
43- }
42+ // return new ListViewModel<TEntity> { Results = result, TotalCount = result.Count };
43+ //}
44+
45+ public Task < List < TEntity > > GetItemsAsync ( Func < IQueryable < TEntity > , IIncludableQueryable < TEntity , object > > includes ,
46+ Expression < Func < TEntity , bool > > condition , CancellationToken cancellationToken = default ) => throw new NotImplementedException ( ) ;
47+
48+ public Task < TEntity > GetItemByIdAsync ( Func < IQueryable < TEntity > , IIncludableQueryable < TEntity , object > > includes ,
49+ Expression < Func < TEntity , bool > > condition , CancellationToken cancellationToken = default ) => throw new NotImplementedException ( ) ;
50+
51+ public Task < List < TEntity > > GetOrderedItemsAsync ( Func < IQueryable < TEntity > , IIncludableQueryable < TEntity , object > > includes ,
52+ Expression < Func < TEntity , bool > > conditionWhere , Expression < Func < TEntity , dynamic > > orderBy ,
53+ OrderType orderType = OrderType . Ascending , CancellationToken cancellationToken = default ) => throw new NotImplementedException ( ) ;
54+
55+ public Task < int > GetItemsCountAsync ( Func < IQueryable < TEntity > , IIncludableQueryable < TEntity , object > > includes ,
56+ Expression < Func < TEntity , bool > > condition , CancellationToken cancellationToken = default ) => throw new NotImplementedException ( ) ;
4457}
0 commit comments