private static PersonIn[] GetTestData() { var personList = new PersonIn[TestObjectCount]; for (var i = 0; i < TestObjectCount; i++) { personList[i] = new PersonIn() { BirthDate = DateTime.Now, Id = i, Gender = i % 2 == 0 ? GenderTypeIn.Male : GenderTypeIn.Female, LastName = "LastName" + i.ToString(), FirstName = "FName" + i.ToString(), Address = new AddressIn[] { new AddressIn() { City = "c" + i.ToString(), PostalCode = "2" + i.ToString(), HouseNo = "12", Steet = "S" + i.ToString(), IsPrimary = true }, null, new AddressIn() { City = "testx" } } }; } return(personList); }
public static PersonOut Map(PersonIn input) { if (input == null) { return(null); } return(new PersonOut() { Address = Map(input.Address), Id = input.Id ?? 0, BirthDate = input.BirthDate, Gender = Map(input.Gender), FirstName = input.FirstName, LastName = input.LastName }); }