In this post I'll describe a possible base class for domain entities which implements a surrogate key as identity field and provides equality and hash code. Introduction Martin Fowler writes in his PoEAA book: " The identity field saves a database...