C# 我必须做什么才能在Windows应用商店应用程序中使用SQLite注释?
除了引用SQLite for Windows Runtime(Windows 8.1)外,我还需要做什么才能注释类成员,例如:C# 我必须做什么才能在Windows应用商店应用程序中使用SQLite注释?,c#,sqlite,visual-studio-2013,windows-store-apps,data-annotations,C#,Sqlite,Visual Studio 2013,Windows Store Apps,Data Annotations,除了引用SQLite for Windows Runtime(Windows 8.1)外,我还需要做什么才能注释类成员,例如: public class PlatypusData { [SQLite.PrimaryKey] public int Id { get; set; } public double poisonToeLengthInCentimeters { get; set; } . . . // even King Ko
public class PlatypusData
{
[SQLite.PrimaryKey]
public int Id { get; set; }
public double poisonToeLengthInCentimeters { get; set; }
. . . // even King Kong exposed his API
}
如前所述,我在项目中获得了SQLite引用;右键单击“SQLite.PrimaryKey”注释/装饰不会提供“解析”上下文菜单项
我缺少什么?您添加到项目中的是SQLite数据库引擎。它提供了一个低级的C API来访问数据库。它不包含您正在查找的
PrimaryKey
属性
要添加该特定属性,您需要库。Sqlite net调用(抽象)低级C API,这样您就不必;它为访问数据库提供了更高级别的.Net友好API。您是否将其添加到项目中?否;那一定是我的问题。我要补充一点;如果它解决了问题,你可以给它一个答案…是的,就是这样-给它一个答案,我会接受它。