日期:2014-05-20  浏览次数:20785 次

LINQ join 多了个 is null
我用的是Entity FrameWork 4.3
LINQ为     
var query = from v in
                            (from r in this.DbContxt.Tab_Purchaselist
                             join sr in this.DbContxt.Tab_Purchaseinfo
                                 on r.randid equals sr.randid into gc
                             from g in gc.DefaultIfEmpty()
                             select new
                                        {
                                            r.randid,
                                            r.purchaseOrderId,
                                            r.purchaseType,
                                            r.orderStatus,
                                            r.validEndDate,
                                            r.stockId,
                                            g.itemId,
                                            g.bookAmount
                                        }
                            )