Skip to content

Commit

Permalink
Leer de Azure Mobile App Service implementado.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaloCo committed Dec 28, 2017
1 parent fe9cc27 commit b810899
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Contactos/Contactos/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ private void ContactosListView_ItemSelected(object sender, SelectedItemChangedEv
Navigation.PushAsync(new DetallesContactoPage(contactoSeleccionado));
}

protected override void OnAppearing()
protected override async void OnAppearing()
{
base.OnAppearing();

using (var conn = new SQLite.SQLiteConnection(App.RUTA_DB))
{
conn.CreateTable<Contacto>();
contactos = conn.Table<Contacto>().ToList();
//using (var conn = new SQLite.SQLiteConnection(App.RUTA_DB))
//{
// conn.CreateTable<Contacto>();
// contactos = conn.Table<Contacto>().ToList();

contactosListView.ItemsSource = contactos;
}
// contactosListView.ItemsSource = contactos;
//}

contactos = await App.MobileServiceClient.GetTable<Contacto>().ToListAsync();
contactosListView.ItemsSource = contactos;
}

private void ToolbarItem_Clicked(object sender, EventArgs e)
Expand Down

0 comments on commit b810899

Please sign in to comment.