tags:

views:

37

answers:

1

I have one Windows application and one Web application running on same database but two dbml files(Linq). Now when i update data in windows application, i could not see the updated data in web application. If i rebuild the web application, i am able to see the data. But after deployment, the web application should run without any manual intervention on the database. Please let me know if any solution for that. thanks in advance.

Regards, BLNS

A: 

What it sounds like is that the web application is using the same data context between calls.
Restarting the web server or recycling the associated Application Pool in IIS should have the same effect as redeployment if I'm right.

If this is the case, then you need to rework your data retrieval methods to use a new data context every time.

Roughly:

public List<MyData> GetData()
{
  MyDataContext context = new MyDataContext();
  return context.MyData.ToList();
}
toast