Пример #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");
        }
Пример #2
0
        //Possibly open up later via API call



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

            return(data.GetAllPersons());
        }
Пример #3
0
 public IActionResult Index()
 {
     return(View(new AllAnimalViewModel(animalData.GetAllAnimals(), personData.GetAllPersons())));
 }