C# integer primary key generation using Entity Framework with local database file (Sdf)

Posted by Ronny on Stack Overflow See other posts from Stack Overflow or by Ronny
Published on 2010-06-03T08:46:30Z Indexed on 2010/06/03 9:44 UTC
Read the original article Hit count: 448

Hello,

I'm writing a standalone application and I thought using Entity Framework to store my data.

At the moment the application is small so I can use a local database file to get started.

The thing is that the local database file doesn't have the ability to auto generate integer primary keys as SQL Server does.

Any suggestions how to manage primary keys for entities in a local database file that will be compatible with SQL Server in the future?

Thanks, Ronny

© Stack Overflow or respective owner

Related posts about c#

Related posts about best-practices