Linq左连接类型实体dbset和对象objectResult

时间:2019-07-07 02:39:27

标签: entity-framework linq linq-to-entities

我有一个关于左加入linq的问题,也许缺少关于linq的知识

我想将linq与具有表和存储过程的实体连接起来,但是它显示“查询结果不能多​​次枚举。”我尝试tolise()和asenumable()以及asqueryable()都无法正常工作

 var we = ponDB.GET_SUMARY_ALL(pur_id); //This is stored in sql
var query1 = (from a in ponDB.TM_supplier_name //this is table in sql
                          join b in we on a.ID_add equals b.VENDNUM_add                  into sumary_month
                          from c in sumary_month.DefaultIfEmpty()
                          select new
                          {
                              c.pur_id,
                              a.ID,
                              c.toleramce,
                              c.AllRows,
                              c.CompletedRows,
                              c.sum_order_QTY
                          }).ToList();

0 个答案:

没有答案