A common way is to compare by id for persistent entities and compare by ref if 
entities are transient.
Something like this
http://nhforge.org/wikis/patternsandpractices/identity-field-equality-and-hash-code.aspx

What you describe is more suitable for value objects (aka components).

________________________________________
Från: [email protected] [[email protected]] för soci 
[[email protected]]
Skickat: den 2 september 2011 10:18
Till: nhusers
Ämne: [nhusers] Entity Equals proper implementation

I have read several articled on this topic, however, one info is
missing. Do I need to compare child collections too?

I compare all scalar properties of my entities, but I'm not sure
should i have to compare child entity collection associations too?

If I have to do, do i compare the collection references, or do
SequentialEquals on them?

Thanks,
soci

--
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to