Dim list As New List(Of Customer)()
Dim a As New Customer() With { _
.ID = 1, _
.Name = "Alfreds Futterkiste" _
}
a.Addresses.Add(New Address() With { _
.Country = "Germany", _
.City = "Berlin", _
.Street = "Obere Str. 57", _
.Phone = "030-0074321" _
})
a.Addresses.Add(New Address() With { _
.Country = "Sweden", _
.City = "Luleå", _
.Street = "Berguvsvägen 8", _
.Phone = "0921-12 34 65" _
})
a.Orders.Add(New Order() With { _
.FromDate = New DateTime(2015, 4, 5), _
.Status = "Pending", _
.TotalPrice = 241 _
})
a.Orders.Add(New Order() With { _
.FromDate = New DateTime(2015, 5, 10), _
.Status = "Collecting", _
.TotalPrice = 184 _
})
list.Add(a)
Dim b As New Customer() With { _
.ID = 2, _
.Name = "Frédérique Citeaux" _
}
b.Addresses.Add(New Address() With { _
.Country = "France", _
.City = "Strasbourg", _
.Street = "24, place Kléber", _
.Phone = "88.60.15.31" _
})
b.Addresses.Add(New Address() With { _
.Country = "Spain", _
.City = "Madrid", _
.Street = "C/ Araquil, 67", _
.Phone = "(91) 555 22 82" _
})
b.Orders.Add(New Order() With { _
.FromDate = New DateTime(2015, 6, 15), _
.Status = "Delivered", _
.TotalPrice = 673 _
})
b.Orders.Add(New Order() With { _
.FromDate = New DateTime(2015, 7, 20), _
.Status = "Canceled", _
.TotalPrice = 10537 _
})
list.Add(b)
Me.xamDataGrid.DataSource = list