Hi,
I'm new to LLBLGen and I'm trying to bind a custom WinForms GridView using EntityCollection. The binding works well if I don't use any related datafields. But the related fields needed to be fetched. How do I achieve this?
RelationPredicateBucket filterBucket = new RelationPredicateBucket();
DataAccessAdapter adapter = new DataAccessAdapter();
EntityCollection entities = new EntityCollection(new JobsEntityFactory());
adapter.FetchEntityCollection(entities, filterBucket);
I need to get the related entities too fetched with that collection.
listJobs.Columns.Add(new Column("Client", "Client", 120, delegate(object item) { return ((JobsEntity)item).Clients.ClientName; })); // this is null as it's not fetched yet.
I do realise that I can iterate the entitycollection and fetch the related client individually, but that doesn't sound right to me.
Please advice.
Cheers,
Ganesh