Ejemplo n.º 1
0
        private void SendShowList(string showTitle, int messageSize)
        {
            using (AppDbContext db = new AppDbContext())
            {
                List<Show> shows;
                try
                {
                    shows = db.GetShowsFuzzy(showTitle);
                }
                catch (Exception e)
                {
                    throw new Exception($"{GetType().Name}: An error occurred while retrieving fuzzy shows list", e);
                }

                List<string> showsList = shows.Select(show => $"{string.Format(SubscribeCommandFormat, show.Id)} {show.Title} ({show.OriginalTitle})").ToList();
                List<string> pages = GetPages(showsList, messageSize);
                SendPages(pages);
            }
        }