I am using VS 2010 with .Net version 4.0 and EF version 5 with an existing database. This is my first project using EF and I'm struggling with entity relationships. I have a database that has two tables that are set up something like this:
I simply want to join them in EF as a One-To-Many relationship joined on PART_SEQ_ID alone so that I can use LINQ to query. When I make the join in the model view EF adds the other key fields to the join and guesses at the related fields. If I don't join the tables, I get an error
Problem in mapping fragments starting at line 294:No mapping specified for properties
and
Problem in mapping fragments starting at line 254:Potential runtime violation of table PARTDETAILS keys
Am I doing something wrong? I found this SO post which indicates this may not be possible. If it's not possible, what is the best way to handle situations like this?