标签:
一、聚合函数查询
double sum = 0; using (xxxEntities db = new xxxEntities()) { sum = db.userinfo.AsNoTracking().Where(d => d.id==id).Sum(m => (double?)m.money).GetValueOrDefault(); } return sum;
linq to entity常用操作
原文地址:http://www.cnblogs.com/vipstone/p/5571988.html