Windows Phone 7 中关于提升LocalDataBase性能的分析
1. Compiled Query
Func<OfflineDataContext, int> getNewsCount =
CompiledQuery.Compile((OfflineDataContext newsDB1) =>
(from News p in newsDB1.StoredNewsList
where p.CId == cid
select p).Count());
int storedCurCount = getNewsCount(newsDB);