"Unable to update the EntitySet '[tablename]' because it has a DefiningQuery and no
It turns out the table did not have a primary key defined. Whoops. Because of this, EF did something a little different. It basically treated the table as a view and it seemed to use a combination of all the foreign keys in the table as a composite key, I think.
The solution was to define the primary key for the table and then update the model. This fixed most of the problem, but it also introduced a compile time error about the model. It turned out I then had to go and manually mark the foreign key fields as not part of the primary key.
1 comment:
How can I over come this error with out having a primary key in the table.
Post a Comment