/// <summary> /// Get by id /// </summary> /// <param name="id">The idenfier</param> /// <returns></returns> public Cat GetById(string id) { try { return(_catRepository.GetById(id)); } catch (Exception ex) { _logger.LogError(ex.Message); throw; } }
public async Task <IActionResult> GetById(Guid id) { return(Ok(await _repository.GetById(id))); }
public IActionResult Details(int id) { var model = _catRepo.GetById(id); return(View(model)); }