SQL语句:
SELECT * FROM dbo.PlatformUserOrg A LEFT JOIN dbo.BusinessPlatformAccount B ON A.AppId=B.AppId AND A.OrgCode=B.Account WHERE B.AccountType=0
Linq写法:
from orgInfo in db.PlatformUserOrgs join accountInfo in db.BusinessPlatformAccounts on new { appId = orgInfo.AppId, orgCode = orgInfo.OrgCode } equals new { appId = accountInfo.AppId, orgCode = accountInfo.Account } into accountResult from account in accountResult.DefaultIfEmpty() select orgInfo
搜索
复制
<iframe height="240" width="320"></iframe>