Hi,
In My project I have an Entity Model,
In Form1, I have Combobox1 populated with Entities Names (EntityName1, EntityName2, EntityName3)
I wonder how to use the selected value of the combobox as a variable in a linq to Entities Query ?
something like:
var query = (from p in Context.(Combobox.selectedValue) select new { p.ID, p.field1 }).ToList();
Thanks
How to select an Entity class name from combobox and use it as a variable in a linq to Entities Query ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jun 8, 2012, 5:36 AM EDT
Remember also that the type parameter, T, of the resulting List
Samio170 reputationPosted Jun 8, 2012, 10:13 AM EDT
That's a good alternative, spite of I'll suffer with about 20 separate cases,
but I'll begin the job and try it anyway pending the idea matures yet.