/// <summary> /// Opens the new watchlist. /// </summary> /// <param name="userId">The unique identifier of the user who owns the watchlist.</param> /// <param name="name">The watchlist name.</param> /// <param name="symbols">The initial symbols on the watchlist.</param> /// <returns>The identifier of the newly created watchlist.</returns> public Guid CreateWatchlist(Guid userId, string name, IEnumerable <string> symbols) { Validate.NotEmpty(userId, nameof(userId)); Validate.NotNullOrWhitespace(name, nameof(name)); Watchlist watchlist = Watchlist.CreateNew(userId, name, symbols); _watchlistRepository.Save(watchlist); return(watchlist.Id); }