I had the following structure:
User has many books in his history
which was transferred to the next
class User { ICollection<Book> History }
User -> UserHistory (UserId, BookId) -> Book
Now I want to add a date to the story by creating the following class structure:
class User { ICollection<Read> History }
class Read { Book Book, Date At }
and saving the db schema almost unchanged
User -> UserHistory (UserId, BookId, At) -> Book
I want to match Readwith the UserHistoryquestions:
- What should be used as
idin the display Read? UserHistoryprimary key (UserId, BookId). Do I need idNH to work? UserHistory -> Bookseems to be the case one-to-one. How to specify the name of the column BookIdin UserHistorythis case? I do not see the attribute of the column on one-to-one(and there is a reason why I should be explicit about the column name).