LINQ in Action roller

Attach, SubmitChanges doesn't save child objects.

Using the following code block to select a customer using one datacontext, and save a child object using a different data context doesn't work (ie, the changes don't get propogated back to the database). It's a trivial example, but suppose you saved the "Customer" in a session variable on one page, and wanted to add the order on the next page, would you also need to pass the data context as a session variable also? Attaching the child object manually generates an "Item already exists Read More...
Published Wednesday, June 27, 2007 4:01 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog