Instead of nested queries, you should use join operators to join tables based on matching columns.
In your example, the correct Linq query would look something like this:
from a in Active_SLA
join f in FORM_PAGES on a.APP_ID equals f.APP_ID
join p in PERSON_DEVICES on a.PERSON_ID equals p.PERSON_ID
where (f.PAGE_ADDRESS == @Address) && (p.DEVICE_NUMBER == @number)
select a.PRIORITY;
Hope this helps!
source
share