public bool Equals(GenericEntity genericEntity)
        {
            var equals = false;

            if (id.HasValue &&
                HasValue(genericEntity) &&
                GetType() == genericEntity.GetType())
            {
                equals = id.Equals(genericEntity.id);
            }
            return(equals);
        }
 public static bool HasValue(GenericEntity genericEntity)
 {
     return(genericEntity != null && genericEntity.id.HasValue);
 }