Commit 104902f3 authored by hasan khaddour's avatar hasan khaddour

Refactor.

parent 5fd9fdbd
......@@ -14,7 +14,7 @@ namespace PSManagement.SharedKernel.Interfaces
int Take { get; }
int Skip { get; }
bool isPagingEnabled { get; }
bool IsPagingEnabled { get; }
}
}
......@@ -7,11 +7,11 @@ namespace PSManagement.SharedKernel.Repositories
{
public interface IRepository<T> where T :BaseEntity
{
Task<T> GetByIdAsync(int id);
Task<List<T>> ListAsync();
Task<List<T>> ListAsync(ISpecification<T> spec);
Task<T> GetByIdAsync(int id, ISpecification<T> specification = null);
Task<IEnumerable<T>> ListAsync();
Task<IEnumerable<T>> ListAsync(ISpecification<T> specification);
Task<T> AddAsync(T entity);
Task UpdateAsync(T entity);
Task<T> UpdateAsync(T entity);
Task DeleteAsync(T entity);
}
}
......@@ -21,7 +21,7 @@ namespace PSManagement.SharedKernel.Specification
public int Take { get; private set; }
public int Skip { get; private set; }
public bool isPagingEnabled { get; private set; } = false;
public bool IsPagingEnabled { get; private set; } = false;
protected virtual void AddInclude(Expression<Func<T, object>> includeExpression)
{
......@@ -35,7 +35,7 @@ namespace PSManagement.SharedKernel.Specification
{
Skip = skip;
Take = take;
isPagingEnabled = true;
IsPagingEnabled = true;
}
protected virtual void ApplyOrderBy(Expression<Func<T, object>> orderByExpression)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment