public string Put(int id) { ResultObject result = new ResultObject(); try { result.Success = service.Delete(id); return(JsonConvert.SerializeObject(result)); } catch (Exception e) { result.Message = "EXCEPTION: " + e.Message + "Stack: " + e.StackTrace; return(JsonConvert.SerializeObject(result)); } }