/// <summary> /// 用于向 Employees EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToEmployees(Employee employee) { base.AddObject("Employees", employee); }
/// <summary> /// 创建新的 Employee 对象。 /// </summary> /// <param name="employeeID">EmployeeID 属性的初始值。</param> /// <param name="lastName">LastName 属性的初始值。</param> /// <param name="firstName">FirstName 属性的初始值。</param> public static Employee CreateEmployee(global::System.Int32 employeeID, global::System.String lastName, global::System.String firstName) { Employee employee = new Employee(); employee.EmployeeID = employeeID; employee.LastName = lastName; employee.FirstName = firstName; return employee; }