一、聚合函数查询
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;
时间: 2025-01-16 14:23:21
一、聚合函数查询
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;