Ejemplo n.º 1
0
        public HttpResponseMessage DeleteMetricByID([FromQuery] Guid id)
        {
            var response = _repository.DeleteMetricByID(id);

            if (response)
            {
                return(new HttpResponseMessage(HttpStatusCode.OK));
            }
            else
            {
                return(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
        }
Ejemplo n.º 2
0
        public HttpResponseMessage DeleteMetricByID(Guid id)
        {
            try
            {
                var response = _repository.DeleteMetricByID(id);

                if (response)
                {
                    return(new HttpResponseMessage(HttpStatusCode.OK));
                }
                else
                {
                    return(new HttpResponseMessage(HttpStatusCode.InternalServerError));
                }
            }
            catch (Exception)
            {
                return(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
        }