在 Windows 应用商店应用程序项目中,我从 Web 服务获取 JSON,如下所示:http://paste2.org/jfMJ2AGA http://paste2.org/jfMJ2AGA
我有这两门课
public class media
{
public string id { get; set; }
public string type { get; set; }
public string image { get; set; }
public string video { get; set; }
public string snapshot { get; set; }
public string url { get; set; }
public string snapshot_url { get; set; }
}
public class artigos
{
public string menu { get; set; }
public string submenu { get; set; }
public string title { get; set; }
public string subtitle { get; set; }
public string description { get; set; }
public List<media> media { get; set; }
}
我创建了一个 sqlite 数据库:
dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "Database.sqlite");
//start dB
using (var db = new SQLite.SQLiteConnection(dbPath))
{
db.CreateTable<artigos>();
}
但我收到此错误:
不知道 System.Collections.Generic.List`1[xxxxx.media]
我做错了什么吗?
Sqlite 不支持列表。这意味着你不能拥有
public List<media> media { get; set; }
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)