I hope the subject defined what i am trying to do.
I am trying to do a one call to the WCF to get a few configuration/drop down lists..
so.. in order to do that i have
<OperationContract()> _
Function GetConfigData() As MyCompositType
<DataContract()> _
Public Class MyCompositType
Private aEntity As myEntity
<DataMember()> _
Public Property aEntityCollection() As myEntity
Get
Return Me.aEntity
End Get
Set(ByVal value As myEntity)
Me.aEntity = value
End Set
End Property
End Class
and then., for the implementation i have
Public Function GetConfigData() As MyCompositType Implements IService1.GetConfigData
Dim TheCollection As New MyCompositType
Dim adapter As New DataAccessAdapter()
Dim allEntities As New EntityCollection(New myEntity())
adapter.FetchEntityCollection(allEntities, Nothing)
'******************line below will not work......
TheCollection.aEntity = CType(allEntities, myEntity)
End Function
So pretty much what i was trying to do was have GetConfigData return the class MyCompositType
The class MyCompositType would contain the collections.....
is this the right way to do so? like i said., im trying to avoid 4 - 5 calls to get 4-5 drop down lists... i want 1 call to return 1 class that has the collections.... i have done this before when i was returning stright xml datasets in a web services project by adding the dataset to the return xml., that is not what i am trying to do here., i would like class/collections/entities
...