简体   繁体   中英

Database access from UWP app in HTML5/JS

What is the best way to use a database (be it Redis, SQLite, WebSQL or just about anything actually) from a UWP app being developed in HTML5/Javascript ? For a C# or VB.NET app I guess it would be quite easy, since you can just use stuff like this . But how would I do that for a JS-based app?

I guess one option would be to do a wrapper C# project and use that as a data layer (since I believe my JS/HTML project can invoke methods in my other projects in the solution). Is that the best/easiest way or are there any other really good options that I'm missing somehow? It feels a bit clumsy, since I would prefer a solution with 100% Javascript in this case.

You could use IndexedDB in UWP javascript apps.

You can easily find samples online ( here for example) and relevant MSDN documentation is here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM