IBaseRepository.cs
343 bytes
| 1 | namespace Base.Contracts; |
|---|---|
| 2 | |
| 3 | public interface IBaseRepository<TEntity> where TEntity : class, IBaseEntity |
| 4 | { |
| 5 | Task<IEnumerable<TEntity>> GetAllAsync(); |
| 6 | Task<TEntity?> GetByIdAsync(Guid id); |
| 7 | TEntity Add(TEntity entity); |
| 8 | TEntity Update(TEntity entity); |
| 9 | Task<TEntity?> RemoveAsync(Guid id); |
| 10 | Task<bool> ExistsAsync(Guid id); |
| 11 | } |
| 12 | |