IBaseRepository.cs
401 bytes
| 1 | using SplitApp.Shared.Kernel.Domain; |
|---|---|
| 2 | |
| 3 | namespace SplitApp.Shared.Kernel.Persistence; |
| 4 | |
| 5 | public interface IBaseRepository<TEntity> where TEntity : class, IBaseEntity |
| 6 | { |
| 7 | Task<IEnumerable<TEntity>> GetAllAsync(); |
| 8 | Task<TEntity?> GetByIdAsync(Guid id); |
| 9 | TEntity Add(TEntity entity); |
| 10 | TEntity Update(TEntity entity); |
| 11 | Task<TEntity?> RemoveAsync(Guid id); |
| 12 | Task<bool> ExistsAsync(Guid id); |
| 13 | } |
| 14 | |