Пример #1
0
 public SomeViewModel()
 {
     People    = new ObservableCollection <Person>();
     AddPerson = new CoreCommand(async(obj) =>
     {
         var p = new Person()
         {
             FirstName = this.FirstName,
             LastName  = this.LastName,
             DOB       = DateTime.Now
         };
         var result = await SqliteDb.AddOrUpdate <Person>(p);
         if (result.Success)
         {
             People.Add(p);
             FirstName = string.Empty;
             LastName  = string.Empty;
             await CoreSettings.AppNav.PopAsync();
         }
     });
 }