KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to join 2 tables using entity framework. I want the join to the second table to be on a non-primary key column. e.g. I have a table Foo with fields Foo.Id (PK) Foo.DbValue and table Bar Bar.Id (PK) Bar.DbValue Bar.Description And I want to join Foo to Bar in EF on the DbValue field. In hibernate/nhibernate one can do this by adding a column parameter to a many-to-one. roughly like this <class name="Foo" table="Foo> <id name="Id" column="Id" /> <many-to-one name="Bar" class="Bar" column="**DbValue**" /> </class> Thanks in advance if anyone knows how to do this in EF.
Tags (comma-separated)
Save Edits
Cancel