I’ve got a problem and no idea how to solve it. Imagine you have a List<int> with about 6000 unique id’s that matches the id’s of a table with about a million records in a sql datatable. I want to select those 6000 records that matches those id’s via LINQ from my c# program. I don’t want to use Contains() because it gets very slow in translation and the argumentlist gets to big.
Any other ideas how to solve this ?
Something about my scenario ( this is not the real but a similar scenario ) :
I’ve got a Service that is connected to a database. A Client requests a batch of Items like a Person for example. The Service accepts the requests, query the DB and sends the data back to the client.
Person = (PersonID , Prename, Lastname)
Now the Client holds a temporary List of Persons. With an additional method I would like to retrieve the adresses of these Persons from the service. So I put a List of PersonID’s to the service that should give me back a list of Adresses that have references to those persons.
If you are using Entity Framework (EF) you can use inner join between your data (data) and your table (Customers)