Hi,
We have an ASP.NET framework which includes what we call CollectionBasePage's. If a page is inherited from this page you just set the property EntityName (string) and it will use some reflection and invoking to create a EntityCollection filled with all entities for the entityname specified. These pages are in a seperate framework, so we have no access at all to the LLBLGen generated code, this is why we use invocation on the DLL of the data project.
We also keep a, for simplification say, List<string> which contains the fields to display.
This could for example contain:
{ "Numer", "City", "CountryEntity.Name" }.
We now want to do the exact samething with LINQ / Queryable datasources (for more efficient use with ASPxGridView in Server Mode, also for retrieving related fields like CountryEntity.Name in this example).
At the moment we have no clue how to create a query like this in runtime:
var q = from customer in metaData.Customer
select new
{
customer.Number,
customer.City,
customer.CountryEntity.Name
};
Again: This is in a framework which is 100% seperated from the data project, therefore we can only use invoking/activion on the DLL and have no access to the LLBLGen generated code. The ORMSupportClasses are referenced in this framework, so we can for example use IEntity.
We would really appericiate any suggestions on this.
Thanks,
Gab