Can anyone explain why the following code results in "b" being true?
Admin a = new Admin(1);
// at this point a.IsNew is true
adapter.FetchEntity(a);
// at this point a.IsNew is false
AdminRole ar = new AdminRole(1);
// at this point ar.IsNew is true
adapter.FetchEntity(ar);
// at this point ar.IsNew is false
bool b = a.Equals(ar);
From what I can tell from digging onto the code, the .Equals(object obj) method on EntityBase2 looks at the PK fields of the entity, but it never compares that the derived types are also equal, just that they both are entities.
Thanks
CT