public static Person GetPerson(this PersonDTO personDTO) { var person = new Person(); person.Id = personDTO.Id; person.FirstName = personDTO.FirstName; person.MiddleName = personDTO.MiddleName; person.SecondName = personDTO.SecondName; person.Position = personDTO.Position; person.Department = personDTO.Department; person.DateOfBirth = personDTO.DateOfBirth; return person; }
/// <summary> /// Deprecated Method for adding a new object to the People EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPeople(Person person) { base.AddObject("People", person); }
/// <summary> /// Create a new Person object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="firstName">Initial value of the FirstName property.</param> /// <param name="secondName">Initial value of the SecondName property.</param> /// <param name="position">Initial value of the Position property.</param> /// <param name="department">Initial value of the Department property.</param> /// <param name="dateOfBirth">Initial value of the DateOfBirth property.</param> public static Person CreatePerson(global::System.Int32 id, global::System.String firstName, global::System.String secondName, global::System.String position, global::System.String department, global::System.DateTime dateOfBirth) { Person person = new Person(); person.Id = id; person.FirstName = firstName; person.SecondName = secondName; person.Position = position; person.Department = department; person.DateOfBirth = dateOfBirth; return person; }