LINQ in Action roller

LINQ to SQL Tips 6: How to refresh given DataContext won't stomp on your objects

The DataContext is a rather careful beast. Once an object is retrieved, the DataContext will not stomp on it if a query returns the same object again. This is intentional. Imagine the chaos if you modified some of the retrieved objects or even read the values and made some decision based on that and then the results of a subsequent query just stomped all over that object with newly changed values from the database. But that does create a separate problem: if you want to get the new values from the Read More...
Published Friday, May 23, 2008 5:43 PM by Dinesh's Cyberstation
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication