How does IN SQL looks in C# linq -


how in sql looks in c# linq, have tried

select * acon.productdata.lngtext lngcod='swe'  , textid in (select distinct [alfcod]       [acon].[measure].[ratedcurrent]) 

this

from l in lngtexts l.lngcod=="swe" &&  l.textid.contains((from m in measure_ratedcurrents select m.alfcod).distinct()) select l 

dosn't work

you need use contains on result of inner query:

from l in lngtexts l.lngcod=="swe" &&     (from m in measure_ratedcurrents     select m.alfcod).distinct().contains(l.textid) select l 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -