問(wèn)題描述
在我的 UWP 應(yīng)用中,我使用
您需要同時(shí)安裝 SQLite.Net.Async-PCL 和 SQLite.Net-PCL 使用異步操作.
SQLiteConnectionString connString = new SQLiteConnectionString(file.Path, true);var asyncConnction = new SQLiteAsyncConnection(() =>{返回新的 SQLiteConnectionWithLock(new SQLitePlatformWinRT(), connString);});
請(qǐng)注意,SQLite.Net-PCL 軟件包與您安裝的軟件包不同.我不確定異步包是否與那個(gè)兼容.
On my UWP app, I'm using sqlite-net to access the database. According to their GitHub Page I'm using Source Installation. Now I want to migrate to using the Nuget package (To get the latest updates) and they have mentioned getting the PCL package. When I add the PCL package I don't have Async operations available like it was on Source Installation. Please let me know how to proceed on this matter.
When it comes to UWP and I want to use sqlite-net I see soo many nugets in VS 2015 Nuget Package Manager. Please help me which one to choose. (Selected package should not be deprecated in the near future and should be developed actively by the vendor, providing continues updates)
You need to install both SQLite.Net.Async-PCL and SQLite.Net-PCL to use async operations.
SQLiteConnectionString connString = new SQLiteConnectionString(file.Path, true);
var asyncConnction = new SQLiteAsyncConnection(
() => {
return new SQLiteConnectionWithLock(new SQLitePlatformWinRT(), connString);
}
);
Note that the SQLite.Net-PCL package is different from the one you installed. I'm not sure if the async package is compatible with that one.
這篇關(guān)于UWP sqlite-net 異步數(shù)據(jù)庫(kù)訪問(wèn)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!