谁能帮助如何使用 linq(sql 中的“where in”)使用关联搜索?
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')