Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit ee8838c

Browse files
committed
Pulizia codice Repository
1 parent 4e98579 commit ee8838c

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

src/CustomLibrary.EFCore/EFCore/Infrastructure/Interfaces/ICoreDatabase.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
public interface ICoreDatabase<TEntity, TKey> : IDatabase<TEntity, TKey> where TEntity : class, IEntity<TKey>, new()
44
{
5-
//Task<ListViewModel<TEntity>> GetListPaginationAsync(int pageIndex, int pageSize);
6-
//Task<List<TEntity>> GetOrderByIdAscendingAsync();
7-
//Task<List<TEntity>> GetOrderByIdDescendingAsync();
8-
//Task<int> GetCountAsync();
9-
105
Task<List<TEntity>> GetItemsAsync(Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includes,
116
Expression<Func<TEntity, bool>> condition, CancellationToken cancellationToken = default);
127

@@ -18,5 +13,5 @@ Task<List<TEntity>> GetOrderedItemsAsync(Func<IQueryable<TEntity>, IIncludableQu
1813
OrderType orderType = OrderType.Ascending, CancellationToken cancellationToken = default);
1914

2015
Task<int> GetItemsCountAsync(Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includes,
21-
Expression<Func<TEntity, bool>> condition, CancellationToken cancellationToken = default);
16+
Expression<Func<TEntity, bool>> condition, CancellationToken cancellationToken = default);
2217
}

src/CustomLibrary.EFCore/EFCore/Infrastructure/Repository/CoreDatabase.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,6 @@ 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();
14-
15-
// return result.Count;
16-
//}
17-
18-
//public async Task<List<TEntity>> GetOrderByIdAscendingAsync()
19-
//{
20-
// return await DbContext.Set<TEntity>()
21-
// .OrderBy(x => x.Id)
22-
// .AsNoTracking()
23-
// .ToListAsync();
24-
//}
25-
26-
//public async Task<List<TEntity>> GetOrderByIdDescendingAsync()
27-
//{
28-
// return await DbContext.Set<TEntity>()
29-
// .OrderByDescending(x => x.Id)
30-
// .AsNoTracking()
31-
// .ToListAsync();
32-
//}
33-
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();
41-
42-
// return new ListViewModel<TEntity> { Results = result, TotalCount = result.Count };
43-
//}
44-
459
public async Task<List<TEntity>> GetItemsAsync(Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includes,
4610
Expression<Func<TEntity, bool>> condition, CancellationToken cancellationToken = default)
4711
{

0 commit comments

Comments
 (0)