I am writing a standalone application and I thought using the Entity Framework to store my data.
Currently, the application is small, so I can use the local database file to start.
The fact is that the local database file does not have the ability to automatically generate whole primary keys, as SQL Server does.
This is not a problem defining the identifier column as “identifying” when creating the table, but when trying to call the SaveChanges method, it throws the following exception:
{"Server keys and server-generated values are not supported by SQL Server Compact."}
Any suggestions on primary key management for objects in the local database file that will be compatible with SQL Server in the future?
Thanks, Ronny
source
share