/// <summary> /// Adds the supplied share to the 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.</param> /// <param name="symbol">The share symbol.</param> public void AddShare(Guid userId, Guid watchlistId, string symbol) { Validate.NotEmpty(userId, nameof(userId)); Validate.NotEmpty(watchlistId, nameof(watchlistId)); Validate.NotNullOrWhitespace(symbol, nameof(symbol)); Watchlist watchlist = GetWatchlist(userId, watchlistId); watchlist.AddShare(symbol); _watchlistRepository.Save(watchlist); }