/// <summary> /// Rename an existing watchlist. /// </summary> /// <param name="userId">The unique identifier of the user who owns the watchlist.</param> /// <param name="watchlistId">The unique identifier of the watchlist to rename.</param> /// <param name="name">The watchlist name.</param> public void RenameWatchlist(Guid userId, Guid watchlistId, string name) { Validate.NotEmpty(userId, nameof(userId)); Validate.NotEmpty(watchlistId, nameof(watchlistId)); Validate.NotNullOrWhitespace(name, nameof(name)); Watchlist watchlist = GetWatchlist(userId, watchlistId); watchlist.RenameWatchlist(name); _watchlistRepository.Save(watchlist); }