Abubakar Izhar
Abubakar Izhar

Reputation: 1

Solving "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection"

I have a Reservation class in which there’s a virtual navigation property of Scale class for one to many relationship. I’m trying to lazy load scale properties through Scale navigation property but getting null and getting below error

The ObjectContext instance has been disposed and can no longer be used for operations that require a connection

Although my context is not disposed as I’m lazy loading within using context block. Should I switch to eager loading, does this error have something to do with lazy loading?

Upvotes: 0

Views: 18

Answers (0)

Related Questions