我正在使用Rob Conery的Massive ORM。
有没有一种优雅的方法来对返回的记录集进行计数?
有没有一种优雅的方法来对返回的记录集进行计数?
dynamic viewModelExpando = result.ViewData.Model;
var queryFromMassiveDynamic = viewModelExpando.TenTricksNewestFirst;
//fails as have actually got TryInvokeMember on it
var z = queryFromMassiveDynamic.Count();
//works
int i = 0;
foreach (var item in queryFromMassiveDynamic) {
i++;
}