예제 #1
0
        public async Task <ActionResult <Link> > GetLink(Guid id)
        {
            var link = await _repo.GetLinkAsync(id);

            if (link == null)
            {
                return(NotFound());
            }
            return(Ok(link));
        }
예제 #2
0
        public async Task <ActionResult <Link> > GetLink(Guid id)
        {
            var link = await _linksRepo.GetLinkAsync(id);

            return(link == null?NotFound() : Ok(_mapper.Map <LinkDto>(link)));
        }