public ActionResult Index(string name) { var m = new PeopleModel(); if (name.HasValue()) { m.m.name = name; if (m.Count() == 1) { var pid = m.FetchPeople().Single().PeopleId; return(Redirect("/Person/Index/" + pid)); } } else { var i = Session["FindPeopleInfo"] as PeopleSearchInfo; if (i != null) { m.m = i; } } return(View(m)); }