Exemplo n.º 1
0
        public string SearchByName(string searchString)
        {
            var allPeople = PersonData.GetAllPersons();

            foreach (var p in allPeople)
            {
                if (p.LastName == searchString)
                {
                    return(p.ToString());
                }
            }

            return("No Person found with the given name");
        }
Exemplo n.º 2
0
        //Possibly open up later via API call



        private List <PersonModel> GetAllPersons()
        {
            PersonData data = new PersonData();

            return(data.GetAllPersons());
        }
Exemplo n.º 3
0
 public IActionResult Index()
 {
     return(View(new AllAnimalViewModel(animalData.GetAllAnimals(), personData.GetAllPersons())));
 }