using System.Linq.Expressions; using Infrastructure.Base; using Shared; namespace Infrastructure; public interface IRepository where T : EntityBase { IEnumerable GetAll(params Expression>[] includes); Task> GetAllAsync(Expression>? expression = null, CancellationToken cancellationToken = default, params Expression>[] includes); Task GetByIdAsync(object id, params Expression>[] includes); Task InsertAsync(T obj); void Update(T obj); void Delete(object id); Task> GetPaginatedListAsync(int pageNumber, int pageSize, string[]? orderBy = null, Expression>? expression = null, CancellationToken cancellationToken = default, params Expression>[] includes); Task CountAsync(Expression>? expression = null, CancellationToken cancellationToken = default); Task ExistsAsync(Expression> expression, CancellationToken cancellationToken = default); }