How to access Link table (2 associations, 2 primary foreign key) In Entity Framework 4 database generated edmx file
I have 2 tables:
User (UserID, UserName)
Books (BookID, BookName)
Each user can hold many books, each book can be hold by many users.
so there is a link table:
UserBook (PFK UserID, PFK BookID).
I've generated a Model using EF4, and I can see the association in the Model, but I can't see User.UserBook,开发者_如何学C nor Book.UserBook. and no UserBook object as well.
how can I query this table ? add items ? etc... ?
User has Books collection, Books has User Collection, Missed that. Idea came through :
this article
精彩评论