public MainViewModel(IPageService pageService, ISQLCrud sqlCrud)
        {
            _pageService = pageService;
            _sqlCrud     = sqlCrud;

            //Uncomment if you want to test with messaging center
            //MessagingCenter.Subscribe<AddItemViewModel, Person>(this, "AddedPerson", (s, e) =>
            //{
            //    PopulateList(e);
            //});

            Names = new ObservableCollection <Person>();

            AddItemCommand        = new Command(AddItems);
            SelectedPersonCommand = new Command(async() => await SelectedPersonMethod());
            DeletePersonCommand   = new Command <Person>(DeleteItem);
            LoadCommand           = new Command(LoadData);



            LoadCommand.Execute(null);
        }
 public AddItemViewModel(IPageService pageService, ISQLCrud sqlCrud)
 {
     _sqlCrud     = sqlCrud;
     _pageService = pageService;
     AddCommand   = new Command(AddItems);
 }