摘要: 这是我写的第一个Linq 语句。写的比较慢。因为经常写sql现在写Linq总是感觉不顺手。不说了,下面就是我的一个Linq语句。获得每组的记录数:varb=fromainList1letpcount=List2.Where(s=>s.CenterId==a.CenterId).Count()wherea.CenterId!=0selectnew{groupID=1,CenterID=a.CenterId,lal=a.Latitude,lo=a.Longitude,isHave=a.HasData,countC=pcount};获取组中记录最大的varc=fromdinbgroupdbyd 阅读全文
posted @ 2011-05-30 12:53 空紫竹 阅读(523) 评论(0) 推荐(0) 编辑