I have a big Table , about 1 million records , and it’s increasing …..
Now i want retrieve 1K records to a list (List) and do something with it and save results to 3 table (use transaction ) , when these 1k records are handled , how can i know and retrieve again ….
i used Ado.net entity framework as data access module .
I want to use MultiThreading , but i am not very familiar with it.
how can i get this done .
could you give me some sample code or Pseudocode ?
If you’re on .NET 4.0 I would recommend you using the Task Parallel Library to perform any sort of parallel operations.
Here’s an example of how you could use it in your scenario:
Here we are processing the list of entities in a parallel fashion using the Parallel.ForEach method, without having to worry about managing threads.
Related resources: