I have a table which has no primary key defined. When adding this to my DataModel the tool generates the following message:
Errors Found During Generation:
warning 6013: The table/view 'CHARGE_DETAILS' does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it.
I cannot modify the table in any way - however I reckon I could construct a composite key from two columns in order to satisfy these requirements.
However it appears that within the EntityType
element Key
can only contain zero or one elements.
So how would I instruct EF to treat two columns as a key?