Filter a data table based on two columns from another data table


I have two data tables, Consider first DT contains a list of 100 products and respective IDs and the second DT contains a list of 25 products, ID, etc.

I want to filter the first datatable with the 25 products and IDs from second DT and display only the line items for those 25 products and ID from first DT…

For example Dt1 has product as AC and ID as 1 then we should filter DT2 for product AC and ID 1
If there are line items with Product - AC and ID - 2 it must not be considered.

Please let me know how to do this

maybe you can share some sample data with us.

Your topic also looks like a duplicate of:

Data table 1


Data table 2


Expected Output


I need to filter DT1 based on two columns from DT2 - Product and ID

Modify & use this Linq Query