/// <summary> /// Returns true if this attribute specifies the same name and configuration as the given attribute. /// </summary> /// <param name="other">The attribute to compare.</param> /// <returns>True if the other object is equal to this object; otherwise false.</returns> protected virtual bool Equals(IndexAttribute other) { return(Name == other.Name && Order == other.Order && IsClustered.Equals(other.IsClustered) && IsUnique.Equals(other.IsUnique)); }
/// <inheritdoc/> public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Order; hashCode = (hashCode * 397) ^ IsClustered.GetHashCode(); hashCode = (hashCode * 397) ^ IsUnique.GetHashCode(); return(hashCode); } }