Reusing existing EF 6 db model classes (originally for sql server) with dotconnect for sqlite (on mono)
Posted: Thu  06 Aug 2015 19:39
				
				Hi,
I have a working webapi project (4.6) using entity framework code first with some code first model classes and using add-migration, update-database type of typical workflow.
I have a need to create a lighter version of the exact same service and run it on rasberry pi 2B device. I want to use the exact same code, ef model first db model classes and target sqlite to run the web service under mono on the pi.
a) Is this realistic and doable as an overall strategy?
b) Can I use the exact same db model classes and the same type of update-database migration workflow and just target a sqlite database with an alternate connection string? Does the devart driver provide complete compatibility in this regard?
c) Does the devart driver insulate me fairly well from type mismatches between sql server and slite as long as I stick to: int, string, decimal, DateTimeOffset ?
d) As long as I don't use db functions, will most of my linq statements work the same way?
e) Does one traditionally have to rewrite any of the prior code when going from sql server to slite?
Just to be clear, the sqlite version will provide an offline type of capability only on certain devices and then I will have some code for the data to sync up to the sql serve version...
Thanks
			I have a working webapi project (4.6) using entity framework code first with some code first model classes and using add-migration, update-database type of typical workflow.
I have a need to create a lighter version of the exact same service and run it on rasberry pi 2B device. I want to use the exact same code, ef model first db model classes and target sqlite to run the web service under mono on the pi.
a) Is this realistic and doable as an overall strategy?
b) Can I use the exact same db model classes and the same type of update-database migration workflow and just target a sqlite database with an alternate connection string? Does the devart driver provide complete compatibility in this regard?
c) Does the devart driver insulate me fairly well from type mismatches between sql server and slite as long as I stick to: int, string, decimal, DateTimeOffset ?
d) As long as I don't use db functions, will most of my linq statements work the same way?
e) Does one traditionally have to rewrite any of the prior code when going from sql server to slite?
Just to be clear, the sqlite version will provide an offline type of capability only on certain devices and then I will have some code for the data to sync up to the sql serve version...
Thanks