from stg in YTStorageInfo
  join ptb in YTPlaceToBarInfo
  on stg.SidVch equals ptb.StorageSidVch
  join lp in YTLockPlaceInfo
  on ptb.StorageSidVch equals lp.FidVch
  group new {stg,lp}
 by new
 {
 ptb.PlaceBarVch,
 ptb.GoodsBarVch,
 ptb.TrayBarVch,
 ptb.StorageSidVch
 }
 into tmp
 select new
 {
 placeBarVch = tmp.Key.PlaceBarVch,
 goodsBarVch = tmp.Key.GoodsBarVch,
 trayBarVch = tmp.Key.TrayBarVch,
 amount = tmp.Sum()//这里报错 实例参数: 无法从“System.Linq.IGrouping<AnonymousType#1,AnonymousType#2>”转换为“System.Linq.IQueryable<int>”
 }刚学linq   希望高手指教