views:

17

answers:

2

My C# program has long executed LINQ query running against MS SQL Server database. I'd like to show user a progress while executing the query. Is there any way to understand LINQ execution progress? Of course I can show undeterminate progress, but if possible, I'd prefer determinate.

+1  A: 

It's not really about the LINQ query, but rather that of the underlying provider. As SQL Server doesn't have any notion of progress for any given query, LINQ cannot either. Regardless, even if the underlying datasource had some notion of progress, the LINQ framework does not have hooks to relay this to the caller. So, the answer is no, unfortunately.

x0n
It's a pity! Thanks!
Alex
A: 

There is no way to do that using LINQtoSQL. LINQtoSQL simply translates your LINQ query to a SQL query and sends it to the database. Then you simply wait until the database returns with results. There is no way to get any progress for that.

Ronald Wildenberg