using System.Linq.Expressions;
namespace PowderCoating.Core.Interfaces;
///
/// Lightweight repository interface for platform-level entities that do not inherit
/// (e.g. Announcement, BannedIp,
/// DashboardTip, ReleaseNote). These entities have no CompanyId, no IsDeleted, and no
/// soft-delete semantics — so the full IRepository<T> contract (SoftDeleteAsync,
/// ignoreQueryFilters) does not apply.
///
/// Any EF-mapped class (does not need to inherit BaseEntity).
public interface IPlainRepository where T : class
{
Task GetByIdAsync(int id);
Task> GetAllAsync();
Task> FindAsync(Expression> predicate);
Task FirstOrDefaultAsync(Expression> predicate);
Task AnyAsync(Expression> predicate);
Task CountAsync(Expression>? predicate = null);
Task AddAsync(T entity);
Task> AddRangeAsync(IEnumerable entities);
Task UpdateAsync(T entity);
Task DeleteAsync(T entity);
Task DeleteAsync(int id);
}