Spaces:
Running
Running
| using System.Linq.Expressions; | |
| namespace ECommerce.Model.Repositories; | |
| public interface IRepository<T> where T : class | |
| { | |
| Task<T?> GetByIdAsync(Guid id); | |
| Task<IReadOnlyList<T>> GetAllAsync(); | |
| Task<IReadOnlyList<T>> FindAsync(Expression<Func<T, bool>> predicate); | |
| Task<T> AddAsync(T entity); | |
| Task UpdateAsync(T entity); | |
| Task DeleteAsync(T entity); | |
| } | |