tehmi ali

tehmi ali

  • NA
  • 19
  • 466

Any one can conert this query in linq

Aug 11 2020 9:12 AM
DECLARE @param int
SET @param = 1
select * from COA_AccountMaster a
join COA_AccountType t on a.Id = t.COA_AccountMasterId
join BankAccounts b on t.Id = b.COA_AccountTypeId
WHERE
a.Id = 3 AND (
(@param = 1 AND b.COA_AccountTypeId IN (11,9))) OR
a.Id = 1 AND (
(@param = 1 AND b.COA_AccountTypeId IN (1,2,3,4,5)))

Answers (2)