select *
from drugpar d
where d.kind in (select [id] from optiondic o where o.name="xiyao")
------解决方案-------------------- var query = from x in drugpar where optiondic.Where(y => y.name == "xiyao").Select(y => y.id).Contains(x.kind);
------解决方案--------------------
------解决方案-------------------- Contains<drugpar>(c.kind) 应该是Contains<int>(c.kind)吧
------解决方案-------------------- 用SQL多好为什么非要用LIQ。好像以后不支持LIQ TO SQL啦吧