Entity framwork 查询
请问 ,ObjectQuery.where(where, values)中怎么用in来查询 ?例如,select * from XXX where id in (1,2,3) --------------------编程问答-------------------- List<int> list = new List<int>() {1, 2, 3};
var result = from id in table where list.Contains(id); --------------------编程问答-------------------- new[]{1,2,3}.Contains(x.id) --------------------编程问答--------------------
--------------------编程问答--------------------
var v=from u in entities.table
where (
new int[]{1,2,3}
).Contains(u.id)
select u;
var query=db.XXX.Where(x=>new int[]{1,2,3}.Contains(x.id));
补充:.NET技术 , LINQ