NewsBot
1
Hi everyone -
I'm looking for a best practice implementation of a Win32 app which uses DataContext and Linq to SQL.
Specifically, I'm interested in the way it handles populating Tables (etc) of Entities in a background thread (eg. BackgroundWorker) and then forwards this to the UI for display.
I'm a little confused how to do this mainly because of deferred execution. I mean, it's simply enough to grab a Table in a background operation and then pass that to the UI thread, but wouldn't it only execute the SQL to populate the table at the point that you consume the table - i.e. when you bind the table to a control? Hence, doesn't this break all the "threading laws" regarding the execution of non-UI work in the UI thread?
Anyway - suffice to say, if there's a "best practice" reference implementation out there, I'd love to see it. Any clues?
Thanks -
/gerrod
More...
View All Our Microsoft Related Feeds
I'm looking for a best practice implementation of a Win32 app which uses DataContext and Linq to SQL.
Specifically, I'm interested in the way it handles populating Tables (etc) of Entities in a background thread (eg. BackgroundWorker) and then forwards this to the UI for display.
I'm a little confused how to do this mainly because of deferred execution. I mean, it's simply enough to grab a Table in a background operation and then pass that to the UI thread, but wouldn't it only execute the SQL to populate the table at the point that you consume the table - i.e. when you bind the table to a control? Hence, doesn't this break all the "threading laws" regarding the execution of non-UI work in the UI thread?
Anyway - suffice to say, if there's a "best practice" reference implementation out there, I'd love to see it. Any clues?
Thanks -
/gerrod
More...
View All Our Microsoft Related Feeds