public ActionResult PersonEdit() { var p = personRepo.Find(1); var vm = new PersonViewModel { Id = p.Id, Name = p.Name }; return View(vm); }
public ActionResult Index() { var p = personRepo.Find(1); var vm = new PersonViewModel { Id = p.Id, Name = p.Name, Friend = personRepo.FindByPersonId(p.Id), Addresses = addressRepo.Find(p.Id).ToArray() }; return View(vm); }