Sky.Net/Core/Interfaces/IGenericRepository.cs
Charles Showalter 344ecb8762 Added Order API
2022-05-24 15:35:03 -07:00

18 lines
509 B
C#

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);
Task<int> CountAsync(ISpecification<T> spec);
void Add(T entity);
void Update(T entity);
void Delete(T entity);
}
}