feat: разделение на repository - services
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
<Folder Include="Infrastructure\" />
|
||||
<Folder Include="Common\" />
|
||||
<Folder Include="Services\" />
|
||||
<Folder Include="Repositories\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
26
PARR.Core/Repositories/Base/IBaseRepository.cs
Normal file
26
PARR.Core/Repositories/Base/IBaseRepository.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using PARR.Domain.Common.Pagination;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using PARR.Domain.Entities.Base.History;
|
||||
|
||||
namespace PARR.Core.Repositories.Base
|
||||
{
|
||||
public interface IBaseRepository<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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using PARR.Core.Repositories.Base;
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
|
||||
namespace PARR.Core.Repositories.Interfaces.TaskRepositories
|
||||
{
|
||||
public interface ITaskErrorRepository : IBaseRepository<TaskError>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using PARR.Core.Repositories.Base;
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
|
||||
namespace PARR.Core.Repositories.Interfaces.TaskRepositories
|
||||
{
|
||||
public interface ITaskRepository : IBaseRepository<TaskItem>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using PARR.Domain.Entities.TaskEntities;
|
||||
|
||||
namespace PARR.Core.Repositories.Interfaces.TaskRepositories
|
||||
{
|
||||
public interface ITaskTypeRepository
|
||||
{
|
||||
IQueryable<TaskType> Get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user