Windows 8.1 Phone Local Database

I just started the “edge” with a Windows phone. I want to write some kind of application, but I need something like Local DataBase. What should i use? I can not find a solution. I tried a local database, but it is not available in WP 8.1, I also found a tutorial on working with json, but this tutorial is also outdated and does not work with 8.1. I just want to write a small tiny DataBase-based application with one table from which I can read and write. Could you send me a link to an article that will solve my problem?

Thanks in advance.

+6
source share
2 answers

I think you're talking about Windows Phone Universal 8.1, right? The local database is only supported for WP7, WP8 and WP8.1 Silverlight (but not universal!). Two alternatives come to me.

  • SQLite: This is a kind of standard for many mobile applications, and is also available for Windows Phone 8.1 Universal. You can find a good tutorial on this here (just in case you are referencing WP8.1 Silverlight, you can find one of my tutorials here ). However, setting up SQLite on Windows Phone is pretty tricky since you need to enable the correct nuget packages. SQLite is not managed code. What you lose will compile as AnyCPU. For the emulator, you need to use x86 to deploy your application on the device / market that you need to create for ARM. I was navigating in my existing application from a local database to SQLite, and it took me ~ 5 long nights to start it.

  • iBoxDB: since I don’t need a relational database like SQLite, I tried iBoxDB, which you can find here . It took me only 3 hours to include it in my project, as this is just one nuget package and is very easy to set up. The downside here is that their documentation may be better. They have a huge sample file that helps to understand how it works, as well as information that you can find on your website. So far, this has really worked well, and I can compile using AnyCPU again, since it is completely code driven. But, as I said, it depends on whether you really need a relational database with tables, etc., Or it’s convenient for you to just save objects somewhere. Btw. it also contains indexes, so performance is not a problem.

+10
source

SQLite for database, SQLite-net for ORM

All details are here http://developer.nokia.com/community/wiki/How_to_use_SQLite_in_Windows_Phone

+1
source

Source: https://habr.com/ru/post/976843/


All Articles