Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. try
  2. {
  3. SQLiteAsyncConnection conn = new SQLiteAsyncConnection(Path.Combine(ApplicationData.Current.LocalFolder.Path, "Database.db"), true);
  4. await conn.CreateTableAsync<Musei>();
  5. var Dbase = Path.Combine(ApplicationData.Current.LocalFolder.Path, "Database.db");
  6. var con = new SQLiteAsyncConnection(Dbase, true);
  7.  
  8. var query = await con.Table<Musei>().OrderBy(x => x.NomeMuseo).ToListAsync();
  9. ListaPreferiti.Source = query;
  10.  
  11.  
  12. }
  13.  
  14. catch (Exception)
  15. {
  16. NoPreferiti.Visibility = Visibility.Visible;
  17. PivotPreferiti.Visibility = Visibility.Collapsed;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement