I've noticed that Refresh can be really nasty depending on the data you've already grabbed from an entity, another solution is to reset the context you are using to a new instance context = new MyDataContext(ConnectionString) This, at least in the scenarios where I am using it is less overhead and less DB calls.
I've noticed that Refresh can be really nasty depending on the data you've already grabbed from an entity, another solution is to reset the context you are using to a new instance. Context = new MyDataContext(ConnectionString); This, at least in the scenarios where I am using it is less overhead and less DB calls.
The issue with that is when we want to update entity that was attach to previous DataContext instance... A DataContext. SubmitChanges call update nothing because no change are detected... So, I think, I need to re-attach entity to new datacontext – Philippe sillon Sep 25 '08 at 17:49 Yes I admit I was frustrated by this as well, with pending changes on one context this becomes an issue. One of the LINQ quirks i'm beginning to live with.
– Quintin Robinson Sep 25 '08 at 18:03 confirmed that . Refresh is still slow 3 years later – Sam Saffron? Jun 13 at 4:48.
We develop Win32 application that access to SQL 2005 database through Linq to SQL. The issue is when 2 users access to same record (View and Edit)… User 1 update record (DataContext.SubmitChanges()), User 2 will continue to see old information until he restart application. So, we would like to update context of user 2… The solution that appears right now is to call DataContext.
Refresh to sync object with SQL table… We wondering if other solution exist?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.