public ActionResult InsertPerson(string name, string gender, string region, string bloodType) { // 테이블에 입력할 데이터를 만듭니다. var willAdd = new People(); willAdd.Name = name; willAdd.Gender = gender; willAdd.Region = region; willAdd.BloodType = bloodType; try { // 테이블에 데이터를 집어넣습니다. var peopleDB = new PeopleDB(); peopleDB.People.InsertOnSubmit(willAdd); peopleDB.SubmitChanges(); return Content("INSERT SUCCESS"); } catch (Exception exception) { // 데이터 입력에 실패할 경우 return HttpNotFound(); } }
partial void DeletePeople(People instance);
partial void UpdatePeople(People instance);
partial void InsertPeople(People instance);