Example #1
0
        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));
            }
        }
Example #2
0
        public void AddMetric(GtMetrics metric)
        {
            var exists = _gtMetricsServices.Get(1);

            if (exists == null)
            {
                AddCompanies(metric);
            }
        }