Good structure so far

This commit is contained in:
lumijiez
2025-05-04 23:42:28 +03:00
parent e001ea67a3
commit b466a39e89
22 changed files with 466 additions and 335 deletions

View File

@@ -4,11 +4,11 @@ namespace Printbase.Domain.Repositories;
public interface IProductRepository
{
Task<Product?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
Task<IEnumerable<Product>> GetAllAsync(CancellationToken cancellationToken = default);
Task<IEnumerable<Product>> GetByTypeIdAsync(Guid typeId, CancellationToken cancellationToken = default);
Task<Product?> GetByIdAsync(Guid id, bool includeRelations = false, CancellationToken cancellationToken = default);
Task<IEnumerable<Product>> GetAllAsync(bool includeRelations = false, CancellationToken cancellationToken = default);
Task<IEnumerable<Product>> GetByTypeIdAsync(Guid typeId, bool includeRelations = false, CancellationToken cancellationToken = default);
Task<Product> AddAsync(Product product, CancellationToken cancellationToken = default);
Task<Product> UpdateAsync(Product product, CancellationToken cancellationToken = default);
Task<bool> DeleteAsync(Guid id, CancellationToken cancellationToken = default);
Task<bool> ExistsAsync(Guid id, CancellationToken cancellationToken = default);
Task AddAsync(Product product, CancellationToken cancellationToken = default);
Task UpdateAsync(Product product, CancellationToken cancellationToken = default);
Task DeleteAsync(Guid id, CancellationToken cancellationToken = default);
}