views:

42

answers:

0

I am using LinqToSQL to grab data from my database. I am injecting my DBContext into the application using Springs IOC container.

If I dont have my VS debugger attached, it works fine.

However, with the debugger attached I get the following errors:

"There is already an open DataReader associated with this Command which must be closed first" This occurs on statements such as:

users.ToList();

Or casting errors (i.e. Unable to cast object of type 'System.Guid' to type 'System.String')

Is anybody else experiencing these issues.

It may bas the case that there are shared instances of the DBContext. THis could be the issue. I'm just surprised that attaching a debugger appears to make a difference