码迷,mamicode.com
首页 > 其他好文 > 详细

EntityFramework left join

时间:2014-06-11 09:54:13      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:class   code   string   os   name   line   

   var result = from u in db.Order
                             join n in db.Equipment on u.OrderId equals n.OrderId into temp
                             from m in temp.DefaultIfEmpty()
                             select new
                             {
                                 OrderID = u.OrderId,
                                 Customername = u.Customername,
                                 EId = m == null "" : m.EId.ToString(),
                                 Price = m == null ? 0 : m.Price
                             };

EntityFramework left join,布布扣,bubuko.com

EntityFramework left join

标签:class   code   string   os   name   line   

原文地址:http://www.cnblogs.com/wolf12/p/3772971.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!