public static PersonDepartment Normalize(PersonDepartment t, Person p, Department d) { if (t == null) return t; if ((t.Person = p) != null) t.Person_Id = p.Id; if ((t.Department = d) != null) t.Department_Id = d.Id; return t; }
public Person Copy(Person src, bool copyId = false) { var dst = this; if (copyId) dst.Id = src.Id; dst.SID = src.SID; dst.FirstName = src.FirstName; dst.LastName = src.LastName; dst.EMail = src.EMail; dst.Phone = src.Phone; return src; }