public IActionResult GetTheWinner(int sessionId)
        {
            var users            = _sessionsRepository.GetAllUserIdsOnASession(sessionId);
            var allRestaurantIds = new List <string>();

            foreach (var item in users)
            {
                var restaurants = _acceptableRestaurantsRepository.GetAllAcceptableRestaurantsByUserAndSessionId(item.Id, sessionId);

                foreach (var selection in restaurants)
                {
                    allRestaurantIds.Add(selection.RestaurantId);
                }
            }
            var query = allRestaurantIds.GroupBy(x => x).Where(g => g.Count() > 1).Select(y => y.Key).ToList();

            if (query.Count == 0)
            {
                return(Ok("No matching restaurants."));
            }
            Random rnd               = new Random();
            var    winningIndex      = rnd.Next(0, query.Count());
            var    winningId         = query[winningIndex];
            var    winningRestaurant = _repository.GetWinningRestaurant(winningId);

            if (winningRestaurant == null)
            {
                return(NotFound("There was an error getting your winning restaurant. Please try again."));
            }
            var completeSession = _sessionsRepository.CompleteASession(sessionId, winningRestaurant.id);

            return(Ok(winningRestaurant));
        }