标签:
LINQ 左右连接:DefaultIfEmpty()
incomeList = (from p in db.Incomes join m in db.Items on p.ItemID equals m.ID into tempResult from m in tempResult.DefaultIfEmpty() select new IncomeItem { ID = p.ID, ItemID = p.ItemID, IncomeMoney = p.IncomeMoney, CreateTime = p.CreateTime, UpdateTime = p.UpdateTime, ItemCode = m.ItemCode, ItemName = m.ItemName }).ToList();
标签:
原文地址:http://www.cnblogs.com/buguangchao/p/4242216.html