public ActionResult Create(Address address) { if(ModelState.IsValid) { DocumentSession.Store(address); DocumentSession.SaveChanges(); return RedirectToAction("Index"); } return View(address); }
public ActionResult Edit(Address address) { if(ModelState.IsValid) { DocumentSession.Query< context.Entry(address).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(address); }