public IActionResult Get(int id) { try { var gtmetric = _gtService.Get(id); if (gtmetric == null) { return(NotFound()); } return(Ok(gtmetric)); } catch (Exception ex) { ModelState.AddModelError("GetMetricById", ex.Message); return(BadRequest(ModelState)); } }
public void AddMetric(GtMetrics metric) { var exists = _gtMetricsServices.Get(1); if (exists == null) { AddCompanies(metric); } }