public IHttpActionResult DeleteProblem(int id, int problemid) { try { ProblemManager manager = new ProblemManager(); Problem temp = manager.Obtener(problemid); if (temp.customer.id == id) { Problem result = manager.Eliminar(problemid); if (result != null) { return(Ok()); } else { return(BadRequest()); } } else { return(NotFound()); } } catch (Exception e) { return(NotFound()); } }