Files
Nexus.Reader/src/.documentation/cache/summaries/NexusReader.Application__Abstractions__Persistence__IEbookRepository.cs.json
T
2026-05-25 14:02:56 +02:00

1 line
5.5 KiB
JSON

{"path":"NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs","purpose":"Defines the application-layer abstraction for ebook and author persistence operations (repository interface) so the Application layer can depend on an interface rather than EF Core or other infra implementations.","classification":{"role":"repository","layer":"application","confidence":0.9,"evidence":["Repository naming pattern","Namespace: NexusReader.Application.Abstractions.Persistence (application-layer abstractions)","Interface name IEbookRepository and methods AddEbook/AddAuthor/SaveChangesAsync indicate repository responsibilities"]},"className":"IEbookRepository","methods":[{"name":"FindAuthorByNameAsync","line":14,"endLine":14,"signature":"(name: string, cancellationToken: CancellationToken = default) -> Task<Author?>","purpose":"Asynchronously finds an Author by name using a case-insensitive comparison.","calls":[],"actions":[{"id":"read_12","kind":"mapping","label":"Lookup author by name (case-insensitive)","line":12,"detail":"Described to perform a case-insensitive search and return an optional Author; implementation will call persistence layer.","visibility":"detail-only","confidence":0.7},{"id":"async_14","kind":"mapping","label":"Asynchronous read","line":14,"detail":"Returns Task<Author?> representing an async persistence read operation.","visibility":"detail-only","confidence":0.7},{"id":"findauthorbynameasync_repository-read_14_0","kind":"repository-read","label":"Reads repository or persistence state","line":14,"detail":"Task<Author?> FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default);","visibility":"secondary-visible","confidence":0.86}]},{"name":"AddAuthor","line":19,"endLine":19,"signature":"(author: Author) -> void","purpose":"Stages a new Author in the repository (adds to the change tracker / in-memory unit-of-work) but does not persist.","calls":[],"actions":[{"id":"write_17","kind":"mapping","label":"Stage author","line":17,"detail":"Adds an Author to the repository as a staged change; persistence deferred until SaveChangesAsync.","visibility":"detail-only","confidence":0.7}]},{"name":"AddEbook","line":24,"endLine":24,"signature":"(ebook: Ebook) -> void","purpose":"Stages a new Ebook in the repository (adds to the change tracker / in-memory unit-of-work) but does not persist.","calls":[],"actions":[{"id":"write_22","kind":"mapping","label":"Stage ebook","line":22,"detail":"Adds an Ebook to the repository as a staged change; persistence deferred until SaveChangesAsync.","visibility":"detail-only","confidence":0.7}]},{"name":"SaveChangesAsync","line":29,"endLine":29,"signature":"(cancellationToken: CancellationToken = default) -> Task<int>","purpose":"Persists all staged changes to the underlying store and returns the number of affected entries.","calls":[],"actions":[{"id":"persistence_27","kind":"mapping","label":"Persist staged changes","line":27,"detail":"Commits all staged additions/updates/deletes to the underlying store and returns affected row count; asynchronous.","visibility":"detail-only","confidence":0.7}]}],"types":[{"name":"IEbookRepository","kind":"interface","line":9,"purpose":"Application-layer abstraction describing persistence operations for Ebook and Author to avoid a direct dependency on EF Core.","fields":[]}],"serviceRegistrations":[],"startupActions":[],"dependencies":["NexusReader.Domain/Entities"],"patterns":["Repository","Unit of Work (staged changes + SaveChangesAsync)","Abstraction/Interface"],"domainConcepts":["Author","Ebook"],"keyDetails":"Interface lives in Application.Abstractions.Persistence to decouple application logic from EF Core; methods indicate staged add semantics and an explicit SaveChangesAsync for committing changes.","orchestrationMethods":[{"name":"FindAuthorByNameAsync","line":14,"confidence":0.57,"reason":"Contains 1 architectural actions relevant to business execution.","actionKinds":["mapping","repository-read"],"evidencePaths":["NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs"]}],"typedContracts":[{"name":"IEbookRepository","kind":"interface","line":9,"fieldCount":0,"evidencePaths":["NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs"]}],"persistenceInteractions":[{"methodName":"FindAuthorByNameAsync","line":14,"kind":"persistence-read","detail":"Task<Author?> FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default);","evidencePaths":["NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs"]}],"externalInteractions":[],"evidenceAnchors":[{"kind":"orchestration-method","label":"FindAuthorByNameAsync","line":14,"summary":"Contains 1 architectural actions relevant to business execution.","confidence":0.57,"evidencePaths":["NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs"]},{"kind":"typed-contract","label":"IEbookRepository","line":9,"summary":"interface with 0 fields.","confidence":0.8,"evidencePaths":["NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs"]},{"kind":"persistence","label":"FindAuthorByNameAsync","line":14,"summary":"Task<Author?> FindAuthorByNameAsync(string name, CancellationToken cancellationToken = default);","confidence":0.82,"evidencePaths":["NexusReader.Application/Abstractions/Persistence/IEbookRepository.cs"]}],"cacheMetadata":{"schemaVersion":2,"analysisVersion":"2026-05-23.cache-v1","contentChecksum":"c067f286c9462edf8d2d3242ba643121c19ee6e4d5686b31829b48fba63ba1d1","sourceByteSize":1006,"analyzedAt":"2026-05-23T16:16:19.003Z","technology":"dotnet"}}