public virtual void Move(Song target) { ParamIs.NotNull(() => target); if (target.Equals(Song)) { return; } Song.AllArtists.Remove(this); Song = target; target.AllArtists.Add(this); }
public virtual void Move(Song target) { ParamIs.NotNull(() => target); if (target.Equals(Song)) { return; } if (Song == null) { throw new InvalidOperationException("Cannot move a track with no song to another song"); } Song.AllAlbums.Remove(this); target.AllAlbums.Add(this); Song = target; }