Update EntitySet<> LINQ to SQL references

Posted by gtas on Stack Overflow See other posts from Stack Overflow or by gtas
Published on 2010-03-14T01:30:50Z Indexed on 2010/03/14 1:35 UTC
Read the original article Hit count: 842

Filed under:
|

I know that when attaching an entity into a DataContext you have to also attach the related referenced objects manually too. While I'm attaching the EntityRef<>'s everything works as expected and my entities are updated to the database. But i have noticed that a problem occurs while trying to attach the EntitySet<>'s.

I dont use rowversion columns so I'm attaching for every entity on the EntitySet<> using original values. Tried just attaching AttachAll() the EntitySet<> with no luck and no exception too.

There is no exception but the update is not really happening. What am i missing?

© Stack Overflow or respective owner

Related posts about c#

Related posts about linq-to-sql