public async Task <ActionResult <Pet> > GetByIdAsync(int id) { var pet = await _repository.GetPetAsync(id); if (pet == null) { return(NotFound()); } return(pet); }
public async Task <ActionResult <Pet> > GetByIdAsync(int id) { var pet = await _repository.GetPetAsync(id); #region snippet_ProblemDetails_StatusCode if (pet == null) { return(NotFound()); } #endregion return(pet); }