示例#1
0
        public async Task <IActionResult> Get(int id)
        {
            var shortUrl = await _shortUrlRepository.FindById(id);

            var response = _mapper.Map <ShortUrlDto>(shortUrl);

            return(Ok(response));
        }
示例#2
0
        public ShortUrl GetById(int id)
        {
            _loggerservice.LogInformation("GetById request called : " + id.ToString());
            var shorturl = _mapper.Map <ShortUrl>(_shortUrlRepository.FindById(id));

            return(shorturl);
        }