任何人都可以幫助如何使用linq(「where in in sql」)進行關聯搜索嗎?如何使用Linq在SQL中以類似的方式搜索代碼集合
LINQ的在哪裏搜索如下這裏,
1. select * from tablename where code = 'code1'
`string[] numbers = { "one", "two", "three", "four" };
string searchNumber = "two";
var number = from number1 in numbers
where number1 == searchNumber
select number1;
foreach (var n in number)
Console.WriteLine(n);
Console.ReadLine();`
如何搜索集合使用LINQ代碼?
2. select * from tablename where code in ('code1','code2')
可能重複(http://stackoverflow.com/questions/959752/where-in-clause-in-linq) – 2012-08-09 12:22:07