Working with SQLite in UWP

*Post will be updated with explanation soon!*

The following samples have been tested on Desktop, Mobile and IoT (Raspberry Pi 2). They require that you have the 10586 SDK installed (Visual Studio 2015 Update 1 or later).

UWP using Entity Framework 7 – use SQLite for persistent storage: EF7Sample

UWP using SQLite-NET, second example using SQLite-WinRT NuGet.
The SQLite-NET sample also demonstrates accessing a SQLite database from a background task (Click the Background Task link on the command bar menu to navigate to a page where you can register and signal (i.e. start) the background task).
*Check the SQLite Extension SDK references in the foreground projects. The samples were built with 3.10.0 but if you have a different SQLite version installed, you will need to remove and then re-add the SQLite extension reference*

2 thoughts on “Working with SQLite in UWP

  1. Stuart Smith

    HI Andy,

    I tried out your example. I am not sure but it looks like the zip does not have the latest code… or I am doing something wrong. The code behind add customer click does not have code in it so no data is being added to the SQLite db.


    1. admin Post author

      Sorry – my mistake. I never wrote the code for that button. The sample does have more general code for inserting records into the database.
      Exercise for the reader, for the missing bit? 🙂 I’ll try to add it at some point in the future.


Leave a Reply

Your email address will not be published. Required fields are marked *