Files
DbFirst/DbFirst.Application/Catalogs/ICatalogService.cs
OlgunR 904e6e20f0 Enforce unique catalog titles on creation
Added a uniqueness check for catalog titles in the creation flow. The service now prevents creating catalogs with duplicate titles by checking for existing entries before insertion. If a duplicate is detected, the API returns a 409 Conflict response. Updated interfaces and repository to support title-based lookups.
2026-01-16 13:42:46 +01:00

11 lines
569 B
C#

namespace DbFirst.Application.Catalogs;
public interface ICatalogService
{
Task<List<CatalogReadDto>> GetAllAsync(CancellationToken cancellationToken = default);
Task<CatalogReadDto?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
Task<CatalogReadDto?> CreateAsync(CatalogWriteDto dto, CancellationToken cancellationToken = default);
Task<CatalogReadDto?> UpdateAsync(int id, CatalogWriteDto dto, CancellationToken cancellationToken = default);
Task<bool> DeleteAsync(int id, CancellationToken cancellationToken = default);
}