public ActionResult Create(Address addr) { if (ModelState.IsValid) { _iRepository.Add(addr); return RedirectToAction("Index"); } else return View(); }
public ActionResult Edit(int id, Address addr) { if (ModelState.IsValid) { _iRepository.Update(addr); return RedirectToAction("Index"); } else return View(); }