IRepositoryBase.cs 1005 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Linq.Expressions;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Ropin.Inspection.Repository
  8. {
  9. public interface IRepositoryBase<T>
  10. {
  11. IEnumerable<T> GetAll();
  12. Task<IEnumerable<T>> GetAllAsync();
  13. Task<IEnumerable<T>> GetByConditionAsync(Expression<Func<T, bool>> expression);
  14. void Create(T entity);
  15. Task CreateOneAsync(T entity);
  16. void Update(T entity);
  17. //Task<bool> UpdateOneAsync(T entity);
  18. void Delete(T entity);
  19. //Task<bool> DeleteOneAsync(T entity);
  20. Task<int> RemoveAsync(T entity);
  21. Task<int> RemoveRangeAsync(IEnumerable<T> entities);
  22. Task<bool> SaveAsync();
  23. Task<int> CreateRangeAsync(IEnumerable<T> entities);
  24. Task<PageData<T>> GetPageAsync(Expression<Func<T, bool>> whereLambda, string ordering,bool IsPagination, int pageIndex, int pageSize, bool isNoTracking = true);
  25. }
  26. }