Filter sql based on C# List instead of a filter table
Say I have a table with the following data: Now I want to filter by the primary keys department and number. I have a list of department and number combinations that have to be filtered in code. In my mind, I would create a join that results in the following: select * from employee e inner join dynamicTable dyn on e.Department = dyn.Department and e.Number = dyn.Number; dynamicTable is my List in C# code that has the primary keys to filter, but I don't know how to pass this list to the database level. I dont't want to load everything from my employees table and that filter in code by linq or