示例#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())));
 }