We are trying to cache Entities retrived from IDbSet in Memcached with binary serializer.
Everything works fine until we try to deserialize entity from cache on subsequent request.
Unable to load type System.Data.Entity.DynamicProxies.users_131D253E3297AF73E52D604FD8627E3CE98FBA26BF1FBA904A6774E41F3D1550 required for deserialization.
Anybody have any ideas? Do you need code examples?
Entity framework uses dynamic proxies to support lazy loading. As the name implies, these types are generated dynamically at runtime, and therefore may not be available in the App Domain when you try to deserialize the stored types.
As a possible solution, you could use Entity Framework Code First (without
virtualproperties), or use EF caching