我似乎无法通过SQLite.Net-PCL下载死机中心;我有一个带有PCL proj,Droid proj,iOS proj和Windows Universal项目的Xamarin表单解决方案。我已经安装了SQLite.Net-PCL和SQLite.Net.Core-PCL的nuget软件包。在Xamarin Forms中找不到SQLite.Net-PCL的工作示例
所以,我回到github项目找到一些很棒的例子来开始,他们都没有工作;显然你必须将一个平台传递到数据库连接,但我得到一个参考错误(如SQLitePlatformWin32)。
在网上搜索参考文献...没什么。搜索平台的nuget和...什么都不是。
我错过了什么? (是的,我觉得哑)
他们有一个例子是
public class Database : SQLiteConnection
{
public Database(string path) : base(new SQLitePlatformWin32(), path)
{
CreateTable<Stock>();
CreateTable<Valuation>();
}}
,我得到的是我不能在“新SQLitePlatformWin32”行解决引用错误。
看看ToDo示例:https://github.com/xamarin/xamarin-forms-samples/tree/master/Todo – Jason