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?

Était-ce utile?

La 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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top