18 lines
680 B
C#
18 lines
680 B
C#
using SIGCM.Domain.Entities;
|
|
|
|
namespace SIGCM.Domain.Interfaces;
|
|
|
|
public interface ICategoryRepository
|
|
{
|
|
Task<IEnumerable<Category>> GetAllAsync();
|
|
Task<Category?> GetByIdAsync(int id);
|
|
Task<int> AddAsync(Category category);
|
|
Task UpdateAsync(Category category);
|
|
Task DeleteAsync(int id);
|
|
Task<IEnumerable<Category>> GetSubCategoriesAsync(int parentId);
|
|
Task<IEnumerable<Operation>> GetOperationsAsync(int categoryId);
|
|
Task AddOperationAsync(int categoryId, int operationId);
|
|
Task RemoveOperationAsync(int categoryId, int operationId);
|
|
Task MergeCategoriesAsync(int sourceId, int targetId);
|
|
Task<bool> HasChildrenAsync(int categoryId);
|
|
} |