I need to store User settings (like address,accessright etc..) in session/cache in order to access them via basecontroller(MVC project).
When I try to reach User.Address from session as can be imagine it says:
The ObjectContext instance has been disposed and can no longer be used
for operations that require a connection.
Address is a Navigational property on User entity.
I don’t wanna use DTO.
Are there any workaround for that?
thanks.
I’m agree with Gert but I prefer to write like this. (for Compile time error checking)