Scenario
I'm having problems finding a possible aggregate root and identifying the proper repositories within my application.
The scenario is like this: I'm writing a library application to practice DDD. The application allows the user to display all books, create a new book or edit an existing one. A book has exactly one author and one publisher assigned. In the application the user can also display, create and edit authors/publishers independently.
Implementation
At the moment I am using three different repositories - BookRepository, AuthorRepository and PublisherRepository - in order to load a book, the associated author and the publisher. All three repositories are used within my ApplicationService to create a new book.
What I don't understand
Looking at this code, it looks to me like I am missing an aggregate root. I thought that maybe the Book class could be an aggregate root. This would mean that the BookRepository would load all the data combined (book, author, publisher), which sounds just fine. This works great when loading a single book, but what happens if I need to display all authors and allow the user to create, edit or delete an author? I could not do that with the Book class as an aggregate root.
Questions
How can an aggregate root and its associated repositories be identified?
If the BookRepository is indeed the aggregate root...
...how would the methods for subordinate entities i.e. for the authors and publishers look like (for example repository.GetBookAuthor, repository.UpdateBookAuthor)?
...how do I manage the authors / publishers (for example to display all the authors for editing)?