Ejemplo n.º 1
0
        public HttpResponseMessage Delete(long id)
        {
            HttpResponseMessage response = null;

            try
            {
                bool isSuccess = false;
                isSuccess = diagnosisService.DeleteDiagnosisById(id);
                if (isSuccess)
                {
                    response = Request.CreateResponse(HttpStatusCode.OK, "Entity removed successfully.");
                }
            }
            catch (Exception ex)
            {
                response = Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message);
            }
            return(response);
        }