[UWP]有关UWP(手机模拟器)中数据库的问题 [英] [UWP]Question regarding databases in a UWP (phone emulator)
问题描述
你好,我正在制作一个应用程序,可以打开Windows手机模拟器上的'虚拟'SD卡选择一个文本文件并阅读它,到目前为止我已经让它工作到这一步,我的下一步是能够将其存储在本地数据库中。我有
在以前使用linq to SQL的普通Windows表单中完成此操作,我想知道是否有任何将我的应用程序连接到本地数据库的请求?
Hello there, I am making an app which will be able to open the 'virtual' sd card on a Windows phone emulator choose a text file and read it, so far I have got it working up to this point, my next step is to be able to store it on a local database. I have done this within a normal Windows form previously using linq to SQL and I was wondering if there was any was of connecting my app to local database please?
非常感谢, 罗比。
Many thanks, Robbie.
推荐答案
你好robbiedarza,
Hi robbiedarza,
如果你想要在本地保存文件,你应该可以使用
ApplicationData.LocalFolder   ;获取本地应用数据存储中的根文件夹。
If you want to save the file in local, you should be able to use ApplicationData.LocalFolder to get the root folder in the local app data store.
此外,还有一个关于 开始在本地存储应用数据的博客,请在此链接中查看: https://blogs.windows.com/buildingapps/2016/ 05/10 / getting-started-stored-app-data-local /#_ Local 。
Also there is a blog about Getting started storing app data locally, please refer it in this link: https://blogs.windows.com/buildingapps/2016/05/10/getting-started-storing-app-data-locally/#_Local.
安装应用程序后,系统会创建每个用户设备上的app数据容器。此应用数据容器位于应用沙箱中,这意味着没有其他应用可以访问它。当应用程序更新时,系统将保留数据容器的内容
,并在用户卸载应用程序时将其删除。
最好的问候,
Jayden Gu
Jayden Gu
这篇关于[UWP]有关UWP(手机模拟器)中数据库的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!