public ActionResult Edit(Persion persion) { if (persion == null) { throw new NullReferenceException("Persion"); } Persion model = sfm.GetPersionById(persion.Id); if (model == null) { throw new NullReferenceException("Persion.Id"); } model.Name = persion.Name; model.Age = persion.Age; sfm.UpdatePersion(model); return(Redirect("/Home/Index")); }