public override bool Equals(IPersistableComponent other) { if (other is PlaylistItem) { return(base.Equals(other) && string.Equals(this.FileName, (other as PlaylistItem).FileName, StringComparison.OrdinalIgnoreCase)); } return(base.Equals(other)); }
public virtual bool Equals(IPersistableComponent other) { if (other == null) { return(false); } if (object.ReferenceEquals(this, other)) { return(true); } if (this.Id == 0) { //Un-persisted data is never equal. return(false); } return(this.Id == other.Id); }