Table treated as view when no primary key is defined in the DB

I was receiving the following error:

Unable to update the EntitySet 'Player' because it has a DefiningQuery and no element exists in the element to support the current operation.

Turns out that Entity Framework treats tables that are created without an explicit primary key, as views, and therefore does not generate an update function.   As usual, a StackOverFlow post quickly put my mind on track.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s