Hey Greg,
SQL Server IDENTITY columns can be 32 bit or 64 bit. Both work ie: int or bigint. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: <http://www.sqldownunder.com/> www.sqldownunder.com From: [email protected] [mailto:[email protected]] On Behalf Of Greg Keogh Sent: Tuesday, 22 January 2013 10:20 PM To: ozDotNet Subject: SQLite and SQL Server schemas Folks, I was considering being able to swap SQLite and SQL Server/Compact/Azure as the backend of my app. I use POCOs as the entities and I can generate multiple EDXMs for the databases and load them dynamically a runtime. It's a bit tricky to keep everything "neutral" and abstract the database away, but it was looking feasible as a good cooding exercise. Then I suddenly reaslised that the POCOs aren't "neutral" because the SQLite IDENTITY columns are 64-bit and the SQL ones are 32-bit. I ran a diff on the POCOs and was suddenly reminded of this difference. Dammit! So, do I make all the IDENTITY columns in the SQL databases 64-bit to match (if that's possible), or perhaps there is some other lateral thinking trick I'm missing. Having a completely replaceable database is a lovely thing to have, but tricker in practise than I initially thought with EF5 and POCOs. Has anyone attempted this sort of thing before? Greg
