public ActionResult New()
 {
     var name = new Name();
     if (Request.IsAjaxRequest())
     {
         return PartialView("NewPartial", name);
     }
     return View(name);
 }
 public ActionResult Create(Name form)
 {
     _repository.Insert(form);
     _repository.Commit();
     if (Request.IsAjaxRequest())
     {
         return PartialView("ListPartial", form);
     }
     return RedirectToAction("Index");
 }
 public ActionResult Update(Name form)
 {
     var original = _repository.FindSingle<Name>(n => n.Id == form.Id);
     original.First = form.First ?? string.Empty;
     original.Last = form.Last ?? string.Empty;
     _repository.Commit();
     if (Request.IsAjaxRequest())
     {
         return PartialView("ListPartial", original);
     }
     return RedirectToAction("Index");
 }
 partial void DeleteName(Name instance);
 partial void UpdateName(Name instance);
 partial void InsertName(Name instance);