Hi all,
Using the following code
oCustomerProjectLinkEntityCollection = New EntityCollection(Of CustomerProjectLinkEntity)(New CustomerProjectLinkEntityFactory)
oRelationPredicateBucket.PredicateExpression.Add(New FieldCompareValuePredicate(CustomerProjectLinkFields.CustomerGuid, Nothing, ComparisonOperator.Equal, CustomerGuid))
Using oDataAccessAdapter As New DataAccessAdapter()
oDataAccessAdapter.FetchEntityCollection(oProjectEntityCollection, oRelationPredicateBucket)
End Using
I'm able to populate the collection.
I've used this to populate a datatable
oPropertyProjectors.Add(New EntityPropertyProjector(CustomerProjectLinkFields.CustomerGuid, "CustomerGuid"))
oDataTable = New DataTable
oCustomerProjectLinkEntityCollection .DefaultView.CreateProjection(oPropertyProjectors, oDataTable)
which works lovely, but I was wondering if I could be clever.
Basically the collection contains a guid which relates to another table, I was wondering how I can access and populate a datatable with the related info.
I was thinking along the lines of this...
for each oCustomerProjectLinkEntity as CustomerProjectLinkEntity in oCustomerProjectLinkEntityCollection
oCustomerProjectLinkEntity.Project.ProjectName
next
which is accessible, I just didn't know how to incorporate this into the PropertyProjectors for a datatable.
Sam