public async Task <IActionResult> Get(int id) { var shortUrl = await _shortUrlRepository.FindById(id); var response = _mapper.Map <ShortUrlDto>(shortUrl); return(Ok(response)); }
public ShortUrl GetById(int id) { _loggerservice.LogInformation("GetById request called : " + id.ToString()); var shorturl = _mapper.Map <ShortUrl>(_shortUrlRepository.FindById(id)); return(shorturl); }