Exemplo n.º 1
0
        public async Task <ActionResult> Get(string id)
        {
            var link = await _linkService.GetLinkById(id);

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

            await _linkService.AddHitToLink(link);

            //return Redirect(link.OriginalLink);
            return(Ok(new GetLinkResult {
                Link = link.OriginalLink
            }));
        }