Home > Net >  About c # GroupBy use AsQueryable error
About c # GroupBy use AsQueryable error

Time:07-19

The  var commodity & # 61; _appDbContext. ArchivesCCommodity. Where (lambda)GroupJoin (_appDbContext ArchivesCCommoditySpecification, a. & # 61;> A.C ode, b & # 61;> B.Com modity, (a, b) the & # 61;> New {a, b}). SelectMany (a & # 61;> A.B.D efaultIfEmpty (), (a, b) the & # 61;> New {a.a, b})GroupJoin (_appDbContext ArchivesCSpecificationDetail, a. & # 61;> A.A.A.B.S pecificationDetail, d & # 61;> , dc ode, (a, d) & # 61;> New} {a, d). SelectMany (a & # 61;> A.D.D efaultIfEmpty (), (a, d) & # 61;> new{Commodity & # 61; A.A.A.C ode,CommodityName & # 61; A.A.A.N ame.SpecificationDetailName & # 61; D.N ame.OrderSN & # 61; D.O rderSN}). AsQueryable (.) OrderBy (a & # 61;> A.O rderSN). GroupBy (a & # 61;> New {a.Com modity, modityName} a.ComSelect (a & # 61;> new{Commodity & # 61; A.Key.Com modity,CommodityName & # 61; A.Key.Com modityName,SpecificationDetailName & # 61; String. The Join (& # 34; - & # 34; , a.S well (a & # 61;> A.S pecificationDetailName)),SpecificationDetailTotal & # 61; String. The Join (& # 34; - & # 34; , a.S well (a & # 61;> A.S pecificationDetailName) & # 61; The & # 61; & # 34; & # 34; ? 0: a.C mount ()}); ;  

with the AsQueryable () will cause an error

 AsQueryable (). OrderBy (a & # 61;> A.O rderSN). GroupBy (a & # 61;> New modityName} {a.Com modity, a.Com)  

It is good to the

AsEnumerable ()

but I think this code temporarily don't send to the database & # xff0c; Because behind also set paging query & # xff0c; Want to behind to send & # xff0c; I don't know how to handle & # xff1f;

  •  Tags:  
  • Related