public async Task SearchById()
 {
     if (PersonTypes.Count == 2)
     {
         if (!string.IsNullOrEmpty(IdSearch))
         {
             List <PersonModel> list = new List <PersonModel>();;
             list.Add(await personService.GetPersonByIdAsync(Int32.Parse(IdSearch)));
             Persons.Items = list;
         }
         else
         {
             Persons.Items = await personService.GetAllPersonsAsync();
         }
     }
     else if (PersonTypes.Count == 1)
     {
         if (!string.IsNullOrEmpty(IdSearch))
         {
             int IdPersonType        = PersonTypes.FirstOrDefault();
             List <PersonModel> list = new List <PersonModel>();;
             list.Add(await personService.GetPersonByIdAndTypeAsync(Int32.Parse(IdSearch), IdPersonType));
             Persons.Items = list;
         }
         else
         {
             int IdPersonType = PersonTypes.FirstOrDefault();
             Persons.Items = await personService.GetAllPersonsByTypeAsync(IdPersonType);
         }
     }
 }
        public async Task UpdatePersonList()
        {
            IdSearch = null;

            if (PersonTypes.Count == 2)
            {
                Persons.Items = await personService.GetAllPersonsAsync();

                SearchByTextVisible = true;
            }
            else if (PersonTypes.Count == 1)
            {
                int IdPersonType = PersonTypes.FirstOrDefault();
                Persons.Items = await personService.GetAllPersonsByTypeAsync(IdPersonType);

                SearchByTextVisible = true;
            }
            else
            {
                Persons.Items.Clear();
                SearchByTextVisible = false;
            }
        }