MyBookmark/Modules.Library.Database/Repositories/IRepository.cs
THE_KONDRAT 7b16d72329 ui and login
mongo => postgres
2024-11-03 16:08:39 +03:00

29 lines
842 B
C#

//using Modules.Library.Database.Database.Models;
//using System.Linq.Expressions;
//namespace Modules.Library.Database.Repositories;
//internal interface IRepository<T> : IRepository<T, Guid> where T : Entity { }
//internal interface IRepository<T, TKey>
//{
// Task<List<T>> GetAllAsync();
// Task<T> GetByIdAsync(TKey id);
// Task<T?> GetByIdOrDefaultAsync(TKey id);
// Task<List<T>> GetRangeByIdsAsync(List<TKey> ids);
// Task<T> GetFirstWhere(Expression<Func<T, bool>> predicate);
// Task<T?> GetFirstOrDefaultWhere(Expression<Func<T, bool>> predicate);
// Task<List<T>> GetWhere(Expression<Func<T, bool>> predicate);
// Task<bool> AnyWhere(Expression<Func<T, bool>> predicate);
// Task<TKey> AddAsync(T entity);
// Task<bool> UpdateAsync(T entity);
// Task<bool> DeleteAsync(T entity);
//}