SQLite.Net PCL support / workaround for Windows Phone 8.1

时光总嘲笑我的痴心妄想 提交于 2019-12-12 14:44:12

问题


I have a WIndows Phone 8.1 application and I want to use the SQLite.Net PCL library forked oysteinkrog here: https://github.com/oysteinkrog/SQLite.Net-PCL However, when I'm trying to create a new connection I do not have all properties needed to create a SQLiteConnectionWithLock
I have found this:

var conn = new SQLiteAsyncConnection(new Func<SQLiteConnectionWithLock>(()=>new SQLiteConnectionWithLock(new SQLitePlatformWinRT(), new SQLiteConnectionString(databasePath, storeDateTimeAsTicks: false))));

But the new SQLitePlatformWinRT does not apply and I can't seem to find an alternative for WP8.1
Any thoughts on a workaround for this?


回答1:


It's compatible the WinRT with the phone, as they wrote it here: SQLite.Net.Platform for Windows Phone 8.1 and in this comment: SQLite.Net-PCL Connection not finding the DB . So you don't need to worry about it, only use as other cases.

EDIT: Make sure you added sqlite3.dll from sqlite.org for windows phone 8.1 WinRT manually.



来源:https://stackoverflow.com/questions/26586902/sqlite-net-pcl-support-workaround-for-windows-phone-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!