Exemplo n.º 1
0
        private ShortUrlDTO CreateShortUrlDTO(Alias alias)
        {
            string visitUrl   = urlResolver.Absolute(urlResolver.Visit(alias.Name));
            string previewUrl = urlResolver.Absolute(urlResolver.Preview(alias.Name));
            int    visits     = visitRepository.Count(alias.Name);

            return(new ShortUrlDTO(alias, visits, visitUrl, previewUrl));
        }