linq to entities, a where in where clause? (inner where)

后端 未结 3 1310
礼貌的吻别
礼貌的吻别 2020-12-16 00:39

I have a table with a one to many mapping to a table that has a many to many mapping to another table. I\'d like to do the following:

var results = context.m         


        
3条回答
  •  时光说笑
    2020-12-16 01:13

    from link in db.main_link_table
    join s in db.some_table on link.association1 = s.association
    join m in db.many_to_many_table on link.association2 = m.association
    where s.X = 'MyValue' AND m.Y = 'MyValue'
    select m; // or s or link or both 3 as you want
    

提交回复
热议问题