C
chris.kennedy
I am really struggling to create an entity which maps to 2 "base"
entities. I have a customer and invoice entity which are based in
tables in a one to many relationship. I have tried:
1. Creating a Invoice Entity based on the Invoice and adding a mapping
to both tables: I can't validate the model it says "Two entities with
different keys are mapped to the same row. Ensure these two mapping
fragments do not map two groups of entities with overlapping keys to
the same group of rows." When I add mappings to tables there is no way
to map to the primary key of invoices but when I validate it says
"Problem in Mapping Fragment starting at line 102: Must specify
mapping for all key properties "
Basically I want to create an entity something similar to a view. I am
I misunderstanding how the entity framework works?
entities. I have a customer and invoice entity which are based in
tables in a one to many relationship. I have tried:
1. Creating a Invoice Entity based on the Invoice and adding a mapping
to both tables: I can't validate the model it says "Two entities with
different keys are mapped to the same row. Ensure these two mapping
fragments do not map two groups of entities with overlapping keys to
the same group of rows." When I add mappings to tables there is no way
to map to the primary key of invoices but when I validate it says
"Problem in Mapping Fragment starting at line 102: Must specify
mapping for all key properties "
Basically I want to create an entity something similar to a view. I am
I misunderstanding how the entity framework works?