Entity Framework: is there a comparison method for EntityObject equal values?

Is there an easy way to compare two EntityObjects for equality of values. I just want to check if all database values ​​match, so I don't care if EntityKey is different.

Is this embedding possible? Or should I just write my own method.

I think Equals () doesn't work the way I want here?

+3
source share
1 answer

Equals() checks for link equality , so that won't help you.

Take a look at this question: What is the best way to compare two entity entities?

2014:
EF , Equality , .

+3

Source: https://habr.com/ru/post/1723696/


All Articles