This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm getting the disposed object error and I'm sure I'm doing this correctly. I have an object that has an EntityCollection<myType> on it. When I start a web request I initiate the context and store it in the HttpContext. Then I get my parent object and try to cycle through the collection on it. Thats when I get the "Cannot access disposed object". I'm sure it used to work. Any ideas? Thanks Craig |
|
|
Don't worry, I have figured it out. I was storing an entity object in a cache, which I need to do an Attach on. Thanks, Craig |
|
|
Hello Craig, Can you show us how you are creating and disposing the unit of work? The LightSpeedContext contains only static configuration information -- it is the UOW which needs to be retained in the HttpContext in order to allow its use throughout the duration of the request. |
|