private async Task ReplyWithRandomRestaurantRecommendation(string starRating, Activity activity, ITurnContext context)
        {
            try
            {
                var previouslyVisistedRestaurants = await _service.GetAllVisitedRestaurantsAsync();

                var recommendation = await _yelpService.GetRandomUnvisitedRestaurantAsync(previouslyVisistedRestaurants, starRating);

                if (recommendation == null)
                {
                    double x;
                    if (double.TryParse(starRating, out x))
                    {
                        starRating = starRating + " star";
                    }
                    await context.SendActivityAsync($"Sorry, I couldn't find a {starRating} place. Can you try a different rating?");
                }
                else
                {
                    var recommendationAttachment = GetFormattedRecommendation(recommendation);

                    var recommendationMessage = activity.CreateReply();
                    recommendationMessage.Attachments = new List <Attachment>()
                    {
                        recommendationAttachment
                    };
                    await context.SendActivityAsync(recommendationMessage);
                }
            }
            catch
            {
                var failedMessage = activity.CreateReply(Messages.UnableToGetRecommendationMessage);
                await context.SendActivityAsync(failedMessage);
            }
        }
        private async Task <ResourceResponse> ReplyWithRandomRestaurantRecommendation(Activity activity, ConnectorClient connector)
        {
            try
            {
                var previouslyVisistedRestaurants = await _service.GetAllVisitedRestaurantsAsync();

                var recommendation = await _yelpService.GetRandomUnvisitedRestaurantAsync(previouslyVisistedRestaurants);

                var recommendationMessage = activity.CreateReply(GetFormattedRecommendation(recommendation));
                return(await connector.Conversations.ReplyToActivityAsync(recommendationMessage));
            }
            catch
            {
                var failedMessage = activity.CreateReply(Messages.UnableToGetRecommendationMessage);
                return(await connector.Conversations.ReplyToActivityAsync(failedMessage));
            }
        }