How do I simplify the access of a has-many relationship with the entity framework?
问题 Here is what I want to do: var user = db.User.First(conditions); user.Book.First(); Here is currently how I have to do that. var user = db.User.Include("Book").First(conditionsForUser); user.Book.First(); The reason why I want to simplify this, is because I don't want to have to specify what is included every time I want to access a relationship. Seems very cumbersome. e.g.: I would like to just be able to do the following, given I have previously retrieved a user: user.Book.First() user.Blog