/// <summary> /// Shows how to Insert or Create a New Record /// </summary> private void Insert() { // first instantiate a new CourseEnrollment CourseEnrollment objCourseEnrollment = new CourseEnrollment(); // assign values you want inserted objCourseEnrollment.CourseName = 12; objCourseEnrollment.StudentName = 12; objCourseEnrollment.Comments = "abc"; // finally, insert a new record // the insert method returns the newly created primary key int newlyCreatedPrimaryKey = objCourseEnrollment.Insert(); }