Sharing code between sqlite-net and servicestack ormlite?

Posted by lanks on Stack Overflow See other posts from Stack Overflow or by lanks
Published on 2012-06-11T00:34:38Z Indexed on 2012/06/11 16:40 UTC
Read the original article Hit count: 225

Filed under:
|
|

I am using sqlite-net to store data on my MonoDroid mobile application. I am wanting to sync this data with a server side service as well.

Would it be possible to share the code for my Entity objects between sqlite-net and Servicestacks ormlite?

The main difference between the two that I can see is declaring the "using namespace" statements at the top of the class for the object. Is it possible to detect the platform and set the using statements based on the platform?

The other difference would be referencing the different dlls for servicestack so I suppose on the mobile app it would not compile if there are references to the servicestack namespaces...

What would a good approach be to achieve sharing of this code?

© Stack Overflow or respective owner

Related posts about c#

Related posts about monodroid