How to write Linq for this T-SQL
LINQ
2
Posts
2
Posters
0
Views
1
Watching
-
select * from A where id in (1,2,3,4,5,6,7,10,15,18,20,25,30,40,45,50,) how to write Linq
You need to use the Contains operator;
var list = new List { 1,2,3,.... };
var query = dc.Table.Where( t=>list.Contains(t.ID) );Syed Mehroz Alam My Blog | My Articles
Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination. - Albert Einstein