Scott Nimrod
Scott Nimrod

Reputation: 11595

Windows 8: How do I implement code reuse of SQLite operations outside of client executable

Windows 8 store apps do not allow other projects within one's solution to perform CRUD operations even though these projects can have the proper reference to the SQLite DLL that's required.

As a result of my finding, I am duplicating my Data Access Layer code in all my Windows Store apps. Thus, development time is increasing dramatically as a result of updating all my apps each time I need to account for recently added tables for the multi app solution that I am building.

NOTE: I heard that implementing SkyDrive integration is an alternative approach that may solve this issue. However, I made the decision early on to implement sync operations with SQLite and cannot afford to swap out data access layers at this stage of development.

Any suggestions?

Thanks, Scott Nimrod

Upvotes: 0

Views: 150

Answers (1)

chue x
chue x

Reputation: 18803

You can place your common data access code in a Windows Store Class Library (dll) project. Each of your applications can then reuse this dll.

Note that your shared dll project does not need a reference to the Sqlite3 binary dll (the sqlite3 Visual Studio extension). It should only be referencing the sqlite api (e.g. Sqlite-net). For your main app, the references should be reversed - it should reference the extension, but not the api.

Upvotes: 1

Related Questions