【发布时间】:2011-01-22 16:13:43
【问题描述】:
using (var nosql = new DbHelper("Feed"))
{
var watch = Stopwatch.StartNew();
nosql.CollectionName = "rawhi";
var x = nosql.GetRecords<Event>(p => true, 0, 1000000);
//GridView1.DataSource = x;
//GridView1.DataBind();
watch.Stop();
long milliseconds = watch.ElapsedMilliseconds;
Response.Write(milliseconds);
}
x 是IQueryable 类型的变量。
当我运行这段代码时,结果是:0
所以我想知道数据是否存储在x var 中?
【问题讨论】:
-
在
watch.Stop()之前尝试x.ToList();。
标签: c# linq iqueryable