小编Bri*_*ang的帖子

Sqlite扩展无法按预期工作

我正在开发一个WinRT应用程序.我想使用sqlite-net-extensions到的支持OneToMany,ManyToMany.

using SQLiteNetExtensions.Attributes;
using SQLite;

[Table("WorkFlow")]
public class Workflow
{
    [PrimaryKey, AutoIncrement]
    public int WorkflowId { get; set; }
    public string Name { get; set; }
    public int Revision { get; set; }
    [OneToMany]
    public List<Step> Steps { get; set; }
}

[Table("Step")]
public class Step
{
    public string Type { get; set; }
    public string Description { get; set; }
    [ManyToOne]
    public Workflow Workflow { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

当我尝试为数据库生成表时,它会引发异常:

app_name.exe中出现"System.NotSupportedException"类型的异常但未在用户代码中处理其他信息:不了解System.Collections.Generic.List`1 [app_name.Model.modelName]

这来自 …

c# windows-runtime windows-store-apps sqlite-net sqlite-net-extensions

10
推荐指数
2
解决办法
4630
查看次数