I have an old database that I am interfacing with using the Entity Framework. I can't alter the schema too much because it is being used by another (very old) application, which will crash if it is not allowed to insert its own value for the column that is supposed to be the PK.
The tables have no primary key constraints set, so no identity is available. They are set to be entity keys in the EF designer though (not code-first). Selections works great, but it fails on insert because it can't figure out what the value for the primary key should be. I tried setting the StoreGeneratedPattern
to none
, computed
, and identity
but none of them worked.
VS 2013, EF 6 I think (honestly not sure how to check because the ADO.net Entity Data Model
project doesn't specify)