public HttpResponseMessage DeleteMetricByID([FromQuery] Guid id) { var response = _repository.DeleteMetricByID(id); if (response) { return(new HttpResponseMessage(HttpStatusCode.OK)); } else { return(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }
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)); } }