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

Commit ab9d68f

Browse files
author
Morten Turn Pedersen
committed
Removed redundant functions
1 parent 2266ec2 commit ab9d68f

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

NetCoreEntityFramework/Repositories/EntitySoftDeleteRepository.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,7 @@ protected EntitySoftDeleteRepository(DbContext context, DbSet<TEntity> table) :
1616
{
1717
}
1818

19-
public override Task<TEntity> Get(Guid id) => Get(id, false);
20-
21-
public Task<TEntity> Get(Guid id, bool includeDeleted = false) => Table.FirstOrDefaultAsync(entity => (includeDeleted || !entity.Deleted) && entity.Id == id);
22-
23-
public override Task<IEnumerable<TEntity>> GetList(
24-
[Range(1, int.MaxValue)] int page,
25-
[Range(1, int.MaxValue)] int pageSize,
26-
Expression<Func<TEntity, bool>> where = null,
27-
Expression<Func<TEntity, object>> orderByExpression = null,
28-
OrderBy orderBy = OrderBy.Ascending) => GetList(page, pageSize, where, orderByExpression, orderBy, GetListMode.ExcludeDeleted);
29-
30-
public override Task<IEnumerable<TEntity>> GetList(
31-
Expression<Func<TEntity, bool>> where = null,
32-
Expression<Func<TEntity, object>> orderByExpression = null,
33-
OrderBy orderBy = OrderBy.Ascending) => GetList(where, orderByExpression, orderBy, GetListMode.ExcludeDeleted);
19+
public virtual Task<TEntity> Get(Guid id, bool includeDeleted = false) => Table.FirstOrDefaultAsync(entity => (includeDeleted || !entity.Deleted) && entity.Id == id);
3420

3521
public async virtual Task<IEnumerable<TEntity>> GetList(
3622
[Range(1, int.MaxValue)] int page,

0 commit comments

Comments
 (0)