在一个 Windows Store 应用程序项目中,我从 Web 服务获取了一个 JSON,它看起来像这样: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] 是什么
我做错了什么吗?