I recently upgraded my VS solution and projects from 3.5 to 4.0 framework. After conversion I am facing a problem when sending entity objects to WCF. When I send an entity which has no other child entities or any relation with other entities, everything works fine... the data is passed to WCF. But when the entity has a child entity I get the following error when calling my WCF service method:
The EntityReference object could not be serialized. This type of object cannot be serialized when the RelationshipManager belongs to an entity object that does not implement IEntityWithRelationships.
Any idea what's gone wrong? I wasn't facing any issues when using framework 3.5.
-Field
properties and theEntityKey
andEntityState
properties? You probably want something lighter-weight for data transfer. Not sure if that's directly related to this error, though. – Rup