コード例 #1
0
 public static Teacher GetTeacherById(int teachrid)
 {
     objTeacher = new Teacher();
     var teachr = (from teachers in DB.Teachers where teachers.TeacherId == teachrid select teachers).FirstOrDefault();
     objTeacher = (Teacher)teachr;
     DB.Detach(objTeacher);
     return objTeacher;
 }
コード例 #2
0
 /// <summary>
 /// Create a new Teacher object.
 /// </summary>
 /// <param name="teacherId">Initial value of the TeacherId property.</param>
 public static Teacher CreateTeacher(global::System.Int32 teacherId)
 {
     Teacher teacher = new Teacher();
     teacher.TeacherId = teacherId;
     return teacher;
 }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Teachers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTeachers(Teacher teacher)
 {
     base.AddObject("Teachers", teacher);
 }