/// <summary>
 /// Create a new Watchlist object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static Watchlist CreateWatchlist(global::System.Int32 id, global::System.String name)
 {
     Watchlist watchlist = new Watchlist();
     watchlist.ID = id;
     watchlist.Name = name;
     return watchlist;
 }
        /// <summary>
        /// Displays a listing of stocks in a watch list.
        /// </summary>
        /// <param name="watchlist">The watchlist to display.</param>
        private void DisplayWatchListStocks(Watchlist watchlist)
        {
            Console.WriteLine("----------------------------------------");
            Console.WriteLine("Stocks in " + watchlist.Name);
            Console.WriteLine("----------------------------------------");
            Console.WriteLine();

            if (watchlist.Stocks.Count <= 0)
            {
                // This watch list is empty.
                Console.WriteLine("No Stocks in Watch List");
            }

            // Print each entry in the list (if any).
            foreach (var stock in watchlist.Stocks)
            {
                Console.WriteLine(stock.Ticker);
            }

            Console.WriteLine();
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Watchlists EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWatchlists(Watchlist watchlist)
 {
     base.AddObject("Watchlists", watchlist);
 }