FromQuery无限连表
#1291
-
Beta Was this translation helpful? Give feedback.
Answered by
2881099
Oct 11, 2022
Replies: 1 comment 1 reply
-
明白你的意思,可以这样写: _freesQuery
.FromQuery(_procInfoQuery)
.InnerJoin((a,b) => ....)
.WithTempQuery((a,b) => new { item1 = a, item2 = b })
.FromQuery(_caseInfoQuery)
.InnerJoin((a,b) => a.item1.id == b.id)
... 产生的 Sql : SELECT ...
FROM
(
SELECT ...
FROM [case_fee_list] CaseFeeList With(NoLock)
INNER JOIN (select case_id, proc_id from [case_proc_info] With(NoLock) where is_enabled = 1) CaseFeeList__CaseProcInfo ON
CaseFeeList__CaseProcInfo.[proc_id] = CaseFeeList.[proc_id]
) a
INNER JOIN
(select case_id from [case_info] With(NoLock) where customer_id = N'6B3A0677-789C-4F21-9994-591549D4E843') CaseFeeList__CaseProcInfo__CaseInfo
ON CaseFeeList__CaseProcInfo__CaseInfo.[case_id] = CaseFeeList__CaseProcInfo.[case_id]
WHERE
(CaseFeeList.[receive_status] = N'0') |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ROMYIM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
明白你的意思,可以这样写:
产生的 Sql :