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"); }
//Possibly open up later via API call private List <PersonModel> GetAllPersons() { PersonData data = new PersonData(); return(data.GetAllPersons()); }
public IActionResult Index() { return(View(new AllAnimalViewModel(animalData.GetAllAnimals(), personData.GetAllPersons()))); }