Wcf serialization and nhibernate lazy loading?

I just noticed that I didn't close my question, I went with the DTO solution and it's working just fine so far.

It's too late to answer ;-) But anyway, this happens because lazy-loaded objects are NH proxy classes; and seems that they're different when loaded like this. One solution is to override .Equals() to compare Id property for persistent entities. I guess your entity has something like primary key.

This will probably make WCF happy, only if it uses equality, not references comparision. If WCF always use ReferenceEquals - no luck.

We have been using this solution and have found it to be easier/better than the DTO solution.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions