c# - Define composite primary key in Entity Framework -


i have table has no primary key defined. when adding datamodel tool generates following message:

errors found during generation:
warning 6013: table/view 'charge_details' not have primary key defined , no valid primary key inferred. table/view has been excluded. use entity, need review schema, add correct keys, , uncomment it.

i cannot modify table in way - reckon construct composite key 2 columns in order satisfy these requirements.

however it appears within entitytype element key can contain zero or one elements.

so how instruct ef treat 2 columns key?

you can create composite primary key on database side. use odp.net? automatically map database pk.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -