private async void btnAgregar_Click(object sender, RoutedEventArgs e) { Categor p = new Categor(); p.descripcion = txtCategoria.Text; p.precioCategoria = txtPrecio.Text; await Categor.AgregarCategoria(p); //No olvidar el await ObtenerDatos(); }