简体   繁体   English

如何为dotnet核心联接中的“ on”赋予多个条件

[英]how to give multiple condition for “on” in dotnet core join

how to give multiple condition for "on" in dotnet core join like- 如何为dotnet核心中的“ on”赋予多个条件,例如-

from x in this.context.RegulatoryUpdates
join m in this.context.RegulatoryUpdateClient on **x.Id equals m.RegulatoryupdateId  and  id = 25** into m
from z in m.DefaultIfEmpty()

You need to create anonymous objects: 您需要创建匿名对象:

from x in this.context.RegulatoryUpdates
join m in this.context.RegulatoryUpdateClient on new { x.Id, id } equals new { Id = m.RegulatoryupdateId, id = 25 } into m
from z in m.DefaultIfEmpty()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM