2022-05-10 15:45:47 -07:00
|
|
|
using Core.Entities;
|
|
|
|
using Core.Specifications;
|
|
|
|
|
|
|
|
namespace Core.Interfaces
|
|
|
|
{
|
|
|
|
public interface IGenericRepository<T> where T : BaseEntity
|
|
|
|
{
|
|
|
|
Task<T> GetByIdAsync(int id);
|
|
|
|
Task<IReadOnlyList<T>> ListAllAsync();
|
|
|
|
Task<T> GetEntityWithSpec(ISpecification<T> spec);
|
|
|
|
Task<IReadOnlyList<T>> ListAsync(ISpecification<T> spec);
|
2022-05-11 16:24:26 -07:00
|
|
|
Task<int> CountAsync(ISpecification<T> spec);
|
2022-05-10 15:45:47 -07:00
|
|
|
}
|
|
|
|
}
|