I've got 3 tables (names are changed to protect the guilty):
Books
BookID long (PK)
Title string
BookChapters
BookID long (FK)
ChapterID long (FK)
Chapters
ChapterID long (PK)
Text string
A "Book" is made of "Chapters". Any chapter may exist in several books at the same time.
I've got Entities generated for each table and the database has relations between books and bookchapters and between chapters and bookchapters. I have permission to add or change relations, if necessary.
Question:
Given a BookID, how do I get a collection of chapters using the generated code?