@lax4u I understand that EF6 is behaving differently for you with otherwise unchanged code. One possible reason for this is multi-threaded code that is behaving differently under EF6 than it did before. Another possible cause is re-entrant code which may be behaving differently due to different events being fired. Or it could be something else. If you could look at your code and determine how it is using EF that would really help in finding the root cause here. Alternately, if you can share the code with us then I'd be happy to take a look.
I don't believe the suggested change to not dispose the context is the right way to go. At the time the Dispose call is made the connection is not null. If it were, then the method being called that is throwing would not be called due to the check for null earlier in the Dispose method.
Thanks,
Arthur
I don't believe the suggested change to not dispose the context is the right way to go. At the time the Dispose call is made the connection is not null. If it were, then the method being called that is throwing would not be called due to the check for null earlier in the Dispose method.
Thanks,
Arthur