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 ?
Thank you
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.
This, at least in the scenarios where I am using it is less overhead and less DB calls.