Linq 的Where in语句

var statusesToFind = new List<int> {1, 2, 3, 4};  
  
var foos = from foo in myEntities.Foos  
      where statusesToFind.Contains(foo.Status)  
      select foo;  

  

posted @ 2011-10-31 16:35  kntao  阅读(739)  评论(0编辑  收藏  举报