日期:2014-05-17 浏览次数:20861 次
var sumnow = (from m in astw
group m by new { m.PBInfo.Town } into x
select new
{
PbInfoCount = x.Select(t => t.PBID).Distinct().Count(),
PBInfo = x.First().PBInfo,
Town = x.First().PBInfo.Towns, //第二级的导航属性取不到
VAT = x.Sum(y => y.VAT),
IncomeTax = x.Sum(y => y.IncomeTax),
ConsumptionTax = x.Sum(y => y.ConsumptionTax)
});