I have several LINQ queries that will churn records (up to a million) based on various filters, and control are modified depending on the values of particular columns on the resulting filtered row items. I would like to implement threading but I am using LINQ to perform the query and the query itself is the source of delay so I believe a progress bar would instantly jump from 0 to 100 % anyway. Is there a way to overcome this?
A specific example is that a Windows Forms ComboBox Items are populated based on distinct values of a user-chosen particular column from another ComboBox. These items are used to dynamically build another linq query, which are used for a custom dynamic charting tool.
Use
SkipandTaketo only load a few records at a time. If you get aCountahead of time, you can advance the progress bar after each query finishes. You will need to do all of this in a background thread to keep the UI responsive so that the progress bar will show the updates.