public ActionResult CreateWorking(Person model) { if (!ModelState.IsValid) { return View(model); } else { model.Id = people.Max(m => m.Id) + 1; people.Add(model); return RedirectToAction("Index"); } }
public ActionResult CreateWorking() { var model = new Person(); return View(); }