public HttpResponseMessage DeleteTodo(DAL.Todo todo) { try { DAL.DAL d = new DAL.DAL(System.Configuration.ConfigurationManager.ConnectionStrings["DB"].ConnectionString); var response = d.DeleteTodo(todo); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception ex) { //send email //appInsight.TrackError(ex); return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.ToString())); } //return true; }