public IActionResult DeleteProviderById(int Id) { IProveedorService service = new ProveedorService(DbContext); Response <Proveedor> response = new Response <Proveedor>(); try { Proveedor p = service.deleteById(Id).Result; response.ok(true, p, "Se cambio el estado a DELETE"); return(Ok(response)); } catch (Exception ex) { response.ok(false, new Proveedor(), "Error al cambiar estado " + ex.Message); return(BadRequest(response)); } }