using System.Linq.Expressions; using SPMS.Domain.Entities; namespace SPMS.Domain.Interfaces; public interface IRepository where T : BaseEntity { Task GetByIdAsync(long id); Task> GetAllAsync(); Task> FindAsync(Expression> predicate); Task<(IReadOnlyList Items, int TotalCount)> GetPagedAsync( int page, int size, Expression>? predicate = null, Expression>? orderBy = null, bool descending = true); Task CountAsync(Expression>? predicate = null); Task ExistsAsync(Expression> predicate); Task AddAsync(T entity); void Update(T entity); void Delete(T entity); }