public async Task <ActionResult <Link> > GetLink(Guid id) { var link = await _repo.GetLinkAsync(id); if (link == null) { return(NotFound()); } return(Ok(link)); }
public async Task <ActionResult <Link> > GetLink(Guid id) { var link = await _linksRepo.GetLinkAsync(id); return(link == null?NotFound() : Ok(_mapper.Map <LinkDto>(link))); }