Seeing a difference in behaviour between IIS Express (Visual studio debugging) and a locally installed IIS server (on my dev machine).
Running the following code via visual studio debugging I get my expected result:
internal void performTest()
{
var dbSet1 = BasicManager<WorkTeam>().GetAll();
var team1 = BasicManager<WorkTeam>().Get(9);
team1.Users.Add(new User());
}
- GetAll() returns the current DBSet of Workteams from our database context. (this is bound using ninject inRequestScope()).
- Workteam 9 is loaded into the dbset and I can see it inside the locals of dbSet1.
- A user object is added to the workteam and again I can see it inside the locals of dbSet1.
However, If I publish this code to a local IIS server, attach a debugger and watch it. The variable team1 is loaded into a different context than the one referenced by dbSet1 and I cannot see it in the locals of dbSet1.
Anyone seen this before or got any ideas?