Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我必须做什么才能在Windows应用商店应用程序中使用SQLite注释?_C#_Sqlite_Visual Studio 2013_Windows Store Apps_Data Annotations - Fatal编程技术网

C# 我必须做什么才能在Windows应用商店应用程序中使用SQLite注释?

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

除了引用SQLite for Windows Runtime(Windows 8.1)外,我还需要做什么才能注释类成员,例如:

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。

您是否将其添加到项目中?否;那一定是我的问题。我要补充一点;如果它解决了问题,你可以给它一个答案…是的,就是这样-给它一个答案,我会接受它。