I need guidance with what I think is a complex Entity Framework 4.1 table query.
An item has a开发者_运维百科 list of associated Identities. A user then has a list of Identities that can be selected. So I'd like to only return items that have identities that are in the user's list and are selected. Any suggestions on how to best tackle this? Thanks in advance
Something like this:
var results = db.UserIdentities
.Where( x => x.UserId == someUserId && x.Selected)
.Select( x => x.Identity.Item);
精彩评论