/// <summary> /// 用于向 Employee EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToEmployee(Employee employee) { base.AddObject("Employee", employee); }
/// <summary> /// 创建新的 Employee 对象。 /// </summary> /// <param name="id">ID 属性的初始值。</param> /// <param name="loginID">LoginID 属性的初始值。</param> /// <param name="password">Password 属性的初始值。</param> /// <param name="employeeName">EmployeeName 属性的初始值。</param> public static Employee CreateEmployee(global::System.Int32 id, global::System.String loginID, global::System.String password, global::System.String employeeName) { Employee employee = new Employee(); employee.ID = id; employee.LoginID = loginID; employee.Password = password; employee.EmployeeName = employeeName; return employee; }