public IActionResult Eliminar(string id) { try { var cat = new CategoriaRepositorio(); int idint = int.Parse(id); cat.Eliminar(idint); return(Ok(new { ok = "ok" })); } catch (Exception e) { return(Ok(new { error = e.Message })); } }