Skip to content
Advertisement

SQL Query to LINQ (use join with two keys)

I have got SQL Query and trying to use LINQ because if EF. Can someone have a look at it tell me where is my mistake, please? SQL Query is working but LINQ returns no data. Basically there is two table A and Table B. I want to do join AB which is (Bring me Data exist in Table A but not in Table B)

I tried this but not working. I need two key values to match when i join two tables as you can see from SQL table.

Advertisement

Answer

Your original query is LEFT JOIN while your code is INNER one, change it into:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement