How to write linq which produce below sql syntax.
Thank you.HTML Code:1.select * from tbl1 where tbl1.id in (select id from tbl2)
2.select * from tbl1 where tbl1.in like (1,2,3,4)
Printable View
How to write linq which produce below sql syntax.
Thank you.HTML Code:1.select * from tbl1 where tbl1.id in (select id from tbl2)
2.select * from tbl1 where tbl1.in like (1,2,3,4)
Well, first off the like as you have it doesn't make sense, even in SQL and isn't likely to work.
When I need something as general as this, I usually look up 101 LINQ Examples.
https://code.msdn.microsoft.com/101-...mples-3fb9811b
it's got a nice cross section of different types of queries you can do with LINQ
-tg