Danishathugging's picture
Sync from GitHub via hub-sync
6db0915 verified
Raw
History Blame Contribute Delete
374 Bytes
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);
}