public async Task <ActionResult> Get(string shortKey)
        {
            var shortUrl = await urlRepository.GetByKeyAsync(shortKey);

            if (shortUrl == null)
            {
                return(NotFound());
            }

            return(Redirect(shortUrl.FullUrl));
        }
Exemplo n.º 2
0
 public async Task <ShortUrl> Get(string shortKey)
 {
     return(await urlRepository.GetByKeyAsync(shortKey));
 }