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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top