/// <summary> /// 创建新的 Worker 对象。 /// </summary> /// <param name="id">Id 属性的初始值。</param> /// <param name="cardNumber">CardNumber 属性的初始值。</param> /// <param name="jobNumber">JobNumber 属性的初始值。</param> /// <param name="name">Name 属性的初始值。</param> /// <param name="gender">Gender 属性的初始值。</param> /// <param name="departmentId">DepartmentId 属性的初始值。</param> /// <param name="jobTitleId">JobTitleId 属性的初始值。</param> public static Worker CreateWorker(global::System.String id, global::System.String cardNumber, global::System.String jobNumber, global::System.String name, global::System.Boolean gender, global::System.String departmentId, global::System.String jobTitleId) { Worker worker = new Worker(); worker.Id = id; worker.CardNumber = cardNumber; worker.JobNumber = jobNumber; worker.Name = name; worker.Gender = gender; worker.DepartmentId = departmentId; worker.JobTitleId = jobTitleId; return worker; }
/// <summary> /// 用于向 Workers EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToWorkers(Worker worker) { base.AddObject("Workers", worker); }