public async Task <ActionResult> GetById(int id) { try { var result = await _repository.GetProductionById(id); if (result == null) { return(NotFound()); } return(Ok(result)); } catch (Exception ex) { throw new JsonException(ex.Message, ex); } }
public Production GetProductionById(int id) { var result = _productionRepository.GetProductionById(id); return(result); }