Entity Framework - using a picklist with a lookup key

I am working on a WPF application that works well using Entity Framework (3.5 SP1) for complex table structures. The problem now is that I want to get a list from EF that includes a lookup into a select table that has multiple picklists.

In SQL, I would write sub select as such:

SELECT Name, (Select typeName from PickLists where type_id = items.type_id and picklist_key = 333) as Type_desc FROM Items

There are no foreign keys for this and the picklists table is never updated using EF, so it only reads against EF.

I'm not sure what is the best way to include this in the model, if at all.

I am showing in read-only datagrid in toolbar.

Thanks!

+2


a source to share





All Articles