feat: разделение на repository - services
This commit is contained in:
@@ -1,22 +1,41 @@
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.Core.Repositories.Base;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces.Base
|
||||
{
|
||||
public interface IBaseService<T> where T : class, IBaseEntity
|
||||
public interface IBaseService<T> : IBaseRepository<T> where T : class, IBaseEntity
|
||||
{
|
||||
Task<T?> GetAsync(Guid id);
|
||||
IQueryable<T> Get();
|
||||
IQueryable<T> GetPage(IQueryable<T> query, PaginationFilter paginationFilter);
|
||||
// TODO: позже удалить этот интерфейс, когда изменим все сервисы на репозитории
|
||||
|
||||
Task<bool> CreateAsync(T obj);
|
||||
Task<bool> AddRangeAsync(List<T> objs);
|
||||
//Task<T?> GetAsync(Guid id);
|
||||
//IQueryable<T> Get();
|
||||
//IQueryable<T> GetPage(IQueryable<T> query, PaginationFilter paginationFilter);
|
||||
|
||||
Task<bool> DeleteAsync(Guid id);
|
||||
bool Delete(T obj);
|
||||
//Task<bool> CreateAsync(T obj);
|
||||
//Task<bool> AddRangeAsync(List<T> objs);
|
||||
|
||||
//Task<bool> CommitAsync();
|
||||
Task<bool> CommitAsync(IHistoryInitiator? initiator = null);
|
||||
//Task<bool> DeleteAsync(Guid id);
|
||||
//bool Delete(T obj);
|
||||
|
||||
////Task<bool> CommitAsync();
|
||||
//Task<bool> CommitAsync(IHistoryInitiator? initiator = null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//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);
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces.TaskServices
|
||||
{
|
||||
public interface ITaskErrorService : IBaseService<TaskError>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces.TaskServices
|
||||
{
|
||||
public interface ITaskService : IBaseService<TaskItem>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
|
||||
namespace PARR.DAL.Services.Interfaces.TaskServices
|
||||
{
|
||||
public interface ITaskTypeService
|
||||
{
|
||||
IQueryable<TaskType> Get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user