Jump to content

Recommended Posts

Posted

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...