public IActionResult GetPeople() { var db = new PeopleDB(_connectionString); var ppl = db.GetPeople(); return(Json(ppl)); }
public IActionResult Index() { PeopleDB db = new PeopleDB(_connectionString); PersonViewModel vm = new PersonViewModel { people = db.GetPeople() }; if (TempData["message"] != null) { vm.Message = (string)TempData["message"]; } return(View(vm)); }
public IActionResult GetPeople() { return(Json(_database.GetPeople())); }