Question

I have been reading about using Sharp Architecture to control nhiberate via Wcf. Is there anything in Sharp Architecture that helps me sending lazy loaded nhiberante entities across wcf?

Was it helpful?

Solution

If the lazy loaded entites have already been hydrated before WCF attempts to serialize them using the NetDataContractSerializer you should be ok. However, if they have not, you are likely to have serialization / deserialization issues as there will be no NHibernate session for available for lazy loading while the serializer traverses the object graph. It's a bit of work but you'd be better off sending DTOs over WCF rather than the attached entities.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top