I’m an old 1.x CSLA user and it’s been a while since I’ve had to design some new objects. I’m trying to nest collections. Is this possible?
Thanks!
Public Class A
Inherits BusinessCollectionBase
Default Public ReadOnly Property Item(ByVal Index As Integer) As Class B
Public Property GroupName
End Class
Public Class B
Inherits BusinessCollectionBase
Default Public ReadOnly Property Item(ByVal Index As Integer) As Class C
Public Property Person
End Class
Public Class C
inherits BusinessBase
Public Property RequestType
Public Property Request
End Class
You can't directly nest collections, because BusinessListBase can only contain BusinessBase child objects.
In other words, the child item in a list must be an object. But that object can have a child collection. So it can look like this:
BB -> BLB -> BB -> BLB -> BB
So yes, you can nest collections, just with intermediate node objects.
Thanks for the help!
Copyright (c) Marimer LLC