private dynamic CreateAddress(int j) { dynamic address = new EdmComplexObject(AddressType); address.FirstLine = "First line " + j; address.SecondLine = "Second line " + j; address.ZipCode = j; address.City = "City " + j; address.State = "State " + j; return address; }
private dynamic CreateAddresses(int i) { EdmComplexObject[] addresses = new EdmComplexObject[i]; for (int j = 0; j < i; j++) { dynamic complexObject = CreateAddress(j); addresses[j] = complexObject; } var collection = new EdmComplexObjectCollection(new EdmCollectionTypeReference(new EdmCollectionType(new EdmComplexTypeReference(AddressType, false)), false), addresses); return collection; }