1

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());
}
  1. GetAll() returns the current DBSet of Workteams from our database context. (this is bound using ninject inRequestScope()).
  2. Workteam 9 is loaded into the dbset and I can see it inside the locals of dbSet1.
  3. 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?

Flick
  • 11
  • 2
  • Make sure you don't look at the value of `dbSet1` before you execute the `Add`. – DavidG Jul 10 '15 at 10:26
  • There's actually a 4th line in my test code that exists so I can stop at the end of the function and check all the variables. Didn't see the need to include it in the question though :) – Flick Jul 10 '15 at 10:29

0 Answers0