public string ShortenUrl(string longUrl)
        {
            var existingUrl = urlShortenerRepository.GetAll <GeneratedShortUrl>()
                              .Where(x => x.LongUrl == longUrl)
                              .SingleOrDefault();

            if (existingUrl != null)
            {
                return(existingUrl.ShortUrl);
            }
            var uniqueId           = guidGenerator.New();
            var serviceWebEndpoint = ConfigurationManager.AppSettings["UrlWeb:Endpoint"];
            var generatedShortUrl  = new GeneratedShortUrl(uniqueId, longUrl, new Uri($"{serviceWebEndpoint}{uniqueId.ToString()}")
                                                           .ToString());

            urlShortenerRepository.Add(generatedShortUrl);

            return(generatedShortUrl.ShortUrl);
        }