using NexusReader.Domain.Entities; namespace NexusReader.Application.Abstractions.Persistence; /// /// Abstraction for Ebook and Author persistence operations. /// Defined in the Application layer to avoid a direct dependency on EF Core. /// public interface IEbookRepository { /// /// Finds an author by name using a case-insensitive comparison. /// Task FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default); /// /// Adds a new author to the repository (staged, not yet persisted). /// void AddAuthor(Author author); /// /// Adds a new ebook to the repository (staged, not yet persisted). /// void AddEbook(Ebook ebook); /// /// Finds an ebook by its unique identifier. /// Task FindByIdAsync(Guid id, CancellationToken cancellationToken = default); /// /// Persists all staged changes to the underlying store. /// Task SaveChangesAsync(CancellationToken cancellationToken = default); }