public override async Task <FindReply> Find(FindRequest request, ServerCallContext context) { _logger.LogInformation($"Find invoked with Id {request.Id}"); Photo ph = await photosService.FindAsync(request.Id); return(ph.ToFindReply()); }
public async Task <ActionResult <Photo> > Find(int id) { Photo ph = await service.FindAsync(id); if (ph == null) { return(NotFound()); } return(ph); }
public async Task <ActionResult <Photo> > Find(int id) { _logger.LogInformation($"Find invoked with Id {id}"); Photo ph = await photosService.FindAsync(id); if (ph == null) { return(NotFound()); } return(ph); }
public async Task <ActionResult <Photo> > Find(int id) { Photo ph = await service.FindAsync(id); if (ph == null) { return(NotFound()); } ph.ImageUrl = Url.Link(nameof(GetImage), new { id = ph.Id }); return(ph); }