public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Status?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (WorkflowExecutionResultKey?.GetHashCode() ?? 0);
            return(hashCode);
        }
 public override int GetHashCode()
 {
     if (cachedHashcode.HasValue)
     {
         return(cachedHashcode.Value);
     }
     if (IsTransient())
     {
         //this.cachedHashcode = base.GetHashCode();
         return(TransientId.GetHashCode()); //don't cache because this won't stay transient forever
     }
     else
     {
         unchecked
         {
             // It's possible for two objects to return the same hash code based on
             // identically valued properties, even if they're of two different types,
             // so we include the object's type in the hash calculation
             var hashCode = GetType().GetHashCode();
             cachedHashcode = (hashCode * HashMultiplier) ^ WorkflowExecutionResultKey.GetHashCode();
         }
     }
     return(cachedHashcode.Value);
 }
 /// <summary>
 ///     Returns true if self and the provided entity have the same Id values
 ///     and the Ids are not of the default Id value
 /// </summary>
 protected bool HasSameNonDefaultIdAs(WorkflowExecutionResult compareTo)
 {
     return(!IsTransient() && !compareTo.IsTransient() && WorkflowExecutionResultKey.Equals(compareTo.WorkflowExecutionResultKey));
 }
 /// <summary>
 ///     Transient objects are not associated with an item already in storage.  For instance,
 ///     a Customer is transient if its Id is 0.  It's virtual to allow NHibernate-backed
 ///     objects to be lazily loaded.
 /// </summary>
 public virtual bool IsTransient()
 {
     return(WorkflowExecutionResultKey == default(int) || WorkflowExecutionResultKey.Equals(default(int)));
 }