I have WinCE app running running on the Compact Framework.
DAL is realized as IoC Services (still in Main EXE) using OpenNETCF.IOC library. This layer handles with POJO classes. Database access established with Compact Framework version of ADO.NET provider. This version is deprecated and not supported.
Now we should have second application that will run on Windows Desktop using the Full Framework. I wish to share a Data Access Layer between these two applications.
As I mentioned there are 2 ways:
Which way is recommended?
Definitely go with #1.
Since you're already abstracting things, why not abstract the DAL to use an ORM that is compatible with both the CF and the desktop and that allows you to swap out the data store implementation? If would avoid the pitfall that you fell into of being tied to a specific data store.