public void NewInsert()
        {
            Person p = new Person();
            p.UpdateFrom(Request.Form);

            db.AddPerson(p);
            db.SubmitChanges();

            RedirectToAction(new { Controller = "Person", Action = "PeopleList" });
        }
 //
 // GET: /Home/
 public ActionResult Index()
 {
     Person model = new Person()
     {
         Address = new Address
         {
             StateDropDown = this.GetStates()
         }
     };
     return View(model);
 }
        public ActionResult IndexPOST(Person model)
        {
            if (ModelState.IsValid)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("Name: {0}", model.Name).AppendLine();
                sb.AppendFormat("Address: {0} {1}", model.Address.City, model.Address.Zip);
                return Content(sb.ToString());
            }

            model.Address.StateDropDown = this.GetStates();
            return View(model);
        }
		private void detach_Persons(Person entity)
		{
			this.SendPropertyChanging();
			entity.ShippingMethod = null;
		}
 partial void DeletePerson(Person instance);
 partial void UpdatePerson(Person instance);
 partial void InsertPerson(Person instance);
 // Add a New Person
 public void AddPerson(Person p)
 {
     Persons.InsertOnSubmit(p);
 }