Entity Identity - use of strings instead of type
I have seen a number of DDD posts and indeed books where entity classes are derived from some form of base class that has a generic parameter for the Entity Identity type: public interface IEntity<out TKey> { TKey Id { get; } } public interface IComplexEntity<out TKey, in TEntity> { TKey Id { get; } bool IsSameAs(TEntity entity); } //Object Definition public class TaxPayer : IComplexEntity<string, User> { ... } On Vernon's Implementing Domain Driven design, specific types are created for use as identities: public class TaxPayerIdentity : Identity { public TaxPayerIdentity() { } public