Need EF entity that relates to multiple tables
Posted: Fri 27 Aug 2010 22:19
This should be really easy, I must be overlooking something. We have a couple tables related by foreign key. I'd like a single entity 'car' to pull most of its data from the car table, and to include one property, manufacturer_name, that is in the related table, 'manufacturer'. The car table includes manufacturer_id as a FK. It is permissible for a row in the car table to have null for the manufacturer_id.
I expected to go to the column mapping editor and find my property manufacturer_name and be able to assign the mapping to the manufacturer table and corresponding field. However, only those properties that have corresponding table columns show up in the editor. I added the manufacturer_name property to the car entity, but there seems to be no way to map this field.
How can I pull in this related value from the associated table?
Thanks!
I expected to go to the column mapping editor and find my property manufacturer_name and be able to assign the mapping to the manufacturer table and corresponding field. However, only those properties that have corresponding table columns show up in the editor. I added the manufacturer_name property to the car entity, but there seems to be no way to map this field.
How can I pull in this related value from the associated table?
Thanks!