I'm re-writing an old VB6 application which used SQL Server 2005 and Access MDB in VS 2013 C# with EF 6.0 to SQL Server 2008 R2 and SQL Server CE 4.0. The app has to function offline in the event of network errors, of which there are many. The offline version needs read-only access. Re-use of code was easy in VB6 I just changed the connections.
I have completed 98% of the code using a Database First model EF 6.0 (just upgraded). Now I need to add support for offline. I thought I could swap out the connections but have read-up that I can not. I'm open to changing the model used but would prefer to keep Database or Model First approach.
I have an external app that creates & copies all the data necessary from SQL Server to SQL Server CE and I have no need for SQL Server technology in the offline. I don't want to re-write all my code just to support offline connections.
I'm willing to support multiple EDMX models, one for SQL Server and one for SQL Server CE but before I do I wanted to get some opinions & advice.
In theory, the application will test access to the server at start up and connect to the offline if the server is not available (assuming the offline SQL Server CE is already generated and ready).