Which local database is suitable for Windows 8 Store Apps?

后端 未结 5 1044
挽巷
挽巷 2021-02-05 06:32

I\'am programming a Windows 8 Store App (Metro Design) with C# and XAML using Visual Studio 2012.

There is no need fo

相关标签:
5条回答
  • 2021-02-05 07:06

    As one of variant:

    Devart LinqConnect for Metro – a fully-functional high-performance ORM solution for developing Windows Store applications using either of LINQ or ADO.NET to access data.

    http://code.msdn.microsoft.com/windowsapps/A-Simple-Windows-Store-85f29843#content

    or next link can be usefull to

    http://social.technet.microsoft.com/wiki/contents/articles/18417.windows-store-app-with-a-sqlite-database.aspx

    0 讨论(0)
  • 2021-02-05 07:10

    Ok, this is a great question that I had to learn the hard way. By default WinRT applications do NOT have access to, directly at least, to any type of database structure. This means no Express, Compact, CE, SQLite etc.

    There are three ways around this. Do not use a database and instead use a local file structure where you store and retrieve your data. XML works very nicely with this because you can maintain many of the same features a database would give you.

    The second option is to use IndexedDB. It is similar to a cookie style local storage model where files are saved in your apps local apps folder.

    The third and final option is to use web services. WinRT does have access to the internet which means you can write API and WebServices that can be called. This does mean that you need to have a server running which is connected to a master database. When your app needs data it calls your web service and obtains what it needs.

    Overall, for the application you are describing the first option may best suite your needs. Keep a local XML file in your apps folder and read/write from it.

    0 讨论(0)
  • 2021-02-05 07:14

    SQLite is supported for WinRT.

    http://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e

    0 讨论(0)
  • 2021-02-05 07:22

    My question was marked as a duplicate of this question (although it was about C++ not C#). I thought I should still post my findings here. C++ apps have another alternative:

    Extensible Storage Engine (ESE)

    The list of all such API available for Store apps can be found on this link under the section Jet.

    0 讨论(0)
  • 2021-02-05 07:24

    SQLite is the recommended database to be used for Win 8 Apps. Links for implementing the same

    http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx

    http://code.msdn.microsoft.com/windowsapps/Using-SQLite-Asynchronously-b8372137

    https://visualstudiogallery.msdn.microsoft.com/23f6c55a-4909-4b1f-80b1-25792b11639e

    0 讨论(0)
提交回复
热议问题