gpt4 book ai didi

c# - linq to sql使用lambda连接多列

转载 作者:IT王子 更新时间:2023-10-29 04:26:10 25 4
gpt4 key购买 nike

谁能帮我翻译一下

var query = from s in context.ShoppingMalls
join h in context.Houses
on
new { s.CouncilCode, s.PostCode }
equals
new { h.CouncilCode, h.PostCode }
select s;

进入 lambda 查询?

谢谢。

最佳答案

var query = context.ShoppingMalls
.Join(
context.Houses,
s => new { s.CouncilCode, s.PostCode },
h => new { h.CouncilCode, h.PostCode },
(s, h) => s);

关于c# - linq to sql使用lambda连接多列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10317117/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com