Exemple #1
0
        /// <summary>
        /// 创建新的 StudentPending 对象。
        /// </summary>
        /// <param name="studentId">StudentId 属性的初始值。</param>
        public static StudentPending CreateStudentPending(global::System.Int32 studentId)
        {
            StudentPending studentPending = new StudentPending();

            studentPending.StudentId = studentId;
            return(studentPending);
        }
 /// <summary>
 /// 添加数据是未审核已提交的数据
 /// </summary>
 /// <param name="studentP">Pending数据对象</param>
 /// <returns></returns>
 public int addStudentPending(StudentPending studentP)
 {
     using (DBModelEntities1 db = new DBModelEntities1())
     {
         //添加pending数据
         db.StudentPending.AddObject(studentP);
         return(db.SaveChanges());
     }
 }
Exemple #3
0
 /// <summary>
 /// 用于向 StudentPending EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToStudentPending(StudentPending studentPending)
 {
     base.AddObject("StudentPending", studentPending);
 }