// Use this for initialization private async void Start() { DataServiceAsync ds = new DataServiceAsync("tempDatabase.db"); await ds.CreateDB(); IEnumerable <Person> people = await ds.GetPersons().ToListAsync(); ToConsole(people); people = await ds.GetPersonsNamedRoberto().ToListAsync(); ToConsole("Searching for Roberto ..."); ToConsole(people); }
// Use this for initialization private async void Start() { DataServiceAsync ds = new DataServiceAsync("existing.db"); await ds.CreateDB(); IEnumerable <Person> people = await ds.GetPersons().ToListAsync(); ToConsole(people); people = await ds.GetPersonsNamedRoberto().ToListAsync(); ToConsole("Searching for Roberto ..."); ToConsole(people); await ds.CreatePerson(); ToConsole("New person has been created"); Person p = await ds.GetJohnny(); ToConsole(p.ToString()); }