/// <summary> /// Determines whether the specified <see cref="EntityRelationship<TEntity>" /> is equal to this instance. /// </summary> /// <param name="obj"> /// The <see cref="EntityRelationship<TEntity>" /> to compare with this instance. /// </param> /// <returns> /// <c>true</c> if the specified <see cref="EntityRelationship<TEntity>" /> is equal to this instance; otherwise, <c>false</c>. /// </returns> public bool Equals(EntityRelationship <TEntity> obj) { if (( object )obj == null) { return(false); } return(this == obj); }
/// <summary> /// Checks the entity equality. /// </summary> /// <param name="a">A.</param> /// <param name="b">The b.</param> /// <returns> /// True if the entities are the same; false otherwise. /// </returns> private static bool CheckEntity(EntityRelationship <TEntity> a, EntityRelationship <TEntity> b) { if (a.Entity == null) { if (b.Entity != null) { return(false); } } else { if (b.Entity == null) { return(false); } if (!a.Entity.Equals(b.Entity)) { return(false); } } return(true); }