开发者

Entity Framework multi table query

I need guidance with what I think is a complex Entity Framework 4.1 table query.

Entity Framework multi 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);     
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜