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();