【发布时间】:2014-04-21 21:18:11
【问题描述】:
我正在我的 Windows 应用商店应用程序 (WinRT) 中实现 SQLite 数据库。 我想在两个表之间建立关系(1:n) 书 (1) - 第 (n) 章
class Book
{
[SQLite.AutoIncrement, SQLite.PrimaryKey]
public int Id { get; set; }
public String Title { get; set; }
public String Description { get; set; }
public String Author { get; set; }
public List<Chapter> Chapters { get; set; }
public Book()
{
this.Chapeters = new List<Chapter>();
}
}
我明白了
- $exception {"Don't know about System.Collections.Generic.List`1[Audioteka.Models.Chapter]"} System.Exception {System.NotSupportedException}
+ [System.NotSupportedException] {"Don't know about System.Collections.Generic.List`1[Audioteka.Models.Chapter]"} System.NotSupportedException
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
HelpLink null string
HResult -2146233067 int
+ InnerException null System.Exception
Message "Don't know about System.Collections.Generic.List`1[Audioteka.Models.Chapter]" string
我做错了什么?
【问题讨论】:
-
错误信息还有更多内容吗?也许是个例外?
-
此附加信息是我收到的异常消息
-
我以前从未见过错误消息“不知道 System.Collections.Generic.List`1”。您确定要复制并粘贴确切的错误消息吗?
-
@Bobson 我已经更新了我的消息,并在应用中断后从异常中粘贴了更多内容
-
我在documentation 中找不到任何表明它完全支持表之间关系的内容。这会让我相信它只能理解直接转换为 SQL 列类型(int/long、float/double/decimal、string 等)的基本值类型。所以我无能为力,也无法指出任何可以提供帮助的东西。
标签: c# sqlite microsoft-metro windows-runtime windows-store-apps