2026-04-14 09:56:31 +10:00
|
|
|
|
using PARR.Core.Repositories.Base;
|
2026-04-13 16:58:30 +10:00
|
|
|
|
using PARR.Domain.Entities.Base;
|
2023-05-17 16:30:13 +10:00
|
|
|
|
|
|
|
|
|
|
namespace PARR.DAL.Services.Interfaces.Base
|
|
|
|
|
|
{
|
2026-04-14 09:56:31 +10:00
|
|
|
|
public interface IBaseService<T> : IBaseRepository<T> where T : class, IBaseEntity
|
2023-05-17 16:30:13 +10:00
|
|
|
|
{
|
2026-04-14 09:56:31 +10:00
|
|
|
|
// TODO: позже удалить этот интерфейс, когда изменим все сервисы на репозитории
|
2023-05-17 16:30:13 +10:00
|
|
|
|
|
2026-04-14 09:56:31 +10:00
|
|
|
|
//Task<T?> GetAsync(Guid id);
|
|
|
|
|
|
//IQueryable<T> Get();
|
|
|
|
|
|
//IQueryable<T> GetPage(IQueryable<T> query, PaginationFilter paginationFilter);
|
2023-05-17 16:30:13 +10:00
|
|
|
|
|
2026-04-14 09:56:31 +10:00
|
|
|
|
//Task<bool> CreateAsync(T obj);
|
|
|
|
|
|
//Task<bool> AddRangeAsync(List<T> objs);
|
2023-05-17 16:30:13 +10:00
|
|
|
|
|
2026-04-14 09:56:31 +10:00
|
|
|
|
//Task<bool> DeleteAsync(Guid id);
|
|
|
|
|
|
//bool Delete(T obj);
|
|
|
|
|
|
|
|
|
|
|
|
////Task<bool> CommitAsync();
|
|
|
|
|
|
//Task<bool> CommitAsync(IHistoryInitiator? initiator = null);
|
2023-05-17 16:30:13 +10:00
|
|
|
|
}
|
2026-04-14 09:56:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//public interface IBaseService<T> where T : class, IBaseEntity
|
|
|
|
|
|
//{
|
|
|
|
|
|
// Task<T?> GetAsync(Guid id);
|
|
|
|
|
|
// IQueryable<T> Get();
|
|
|
|
|
|
// IQueryable<T> GetPage(IQueryable<T> query, PaginationFilter paginationFilter);
|
|
|
|
|
|
|
|
|
|
|
|
// Task<bool> CreateAsync(T obj);
|
|
|
|
|
|
// Task<bool> AddRangeAsync(List<T> objs);
|
|
|
|
|
|
|
|
|
|
|
|
// Task<bool> DeleteAsync(Guid id);
|
|
|
|
|
|
// bool Delete(T obj);
|
|
|
|
|
|
|
|
|
|
|
|
// //Task<bool> CommitAsync();
|
|
|
|
|
|
// Task<bool> CommitAsync(IHistoryInitiator? initiator = null);
|
|
|
|
|
|
//}
|
2023-05-17 16:30:13 +10:00
|
|
|
|
}
|