List<int> list = new List<int>(); for (int i = 0; i < 10000; i++) { list.Add(i); } IQueryable<OpLog> v = DB.OpLogs.Where(c=>list.Contains(c.ID));