public App() { InitializeComponent(); //var myDocPath = // DependencyService.Get<IFolder>().GetMyDocumentPath(); //var databasePath = System.IO.Path.Combine(myDocPath, "local.db3"); //Debug.WriteLine("databasePath:{0}", databasePath); //var sqlite = // new SQLiteConnection(databasePath); //string sqlcmd = // "SELECT Count(*) FROM sqlite_master WHERE type='table' AND name=?"; //var result = sqlite.ExecuteScalar<int>(sqlcmd, "Profile"); //if (result == 0) //{ // IList<Profile> profiles = new List<Profile>(); // profiles.Add(new Profile() // { // Display = "電話", // Key = 1, // Value = "09XX123456" // }); // profiles.Add(new Profile() // { // Display = "Email", // Key = 2, // Value = "*****@*****.**" // }); // profiles.Add(new Profile() // { // Display = "暱稱", // Key = 3, // Value = "jimmy wu" // }); // int ret = sqlite.CreateTable<Profile>(); // sqlite.InsertAll(profiles); //} IActorRepository actorRepository = Resolver.Resolve <IActorRepository>(); actorRepository.DeleteAll(); actorRepository.InsertAll(LoadData()); MainPage = new NavigationPage(new ListViewPage()); }