我无法将此linq查询转换为lambda表达式,我尝试使用include
解决它但未成功,请帮助
(from PS in _dbNavigation.Table1
join CP in _dbNavigation.Table2 on PS.PropName equals CP.PropName
where PS.IsDeleted == false && PS.UserName.Equals("REX")
select CP).ToList();
答案 0 :(得分:6)
_dbNavigation.Table1
.Join(_dbNavigation.Table2, t1 => t1.PropName, t2 => t2.PropName, (t1, t2) => new { t1, t2 })
.Where(x => x.t1.IsDeleted == false && x.t2.UserName == "REX")
.Select(x => x.t2);