sqlite not recognizing generic list

 

Questions


On a windows store app project i get a JSON from a webservice that looks like this:http://paste2.org/jfMJ2AGA

and i have these 2 classes

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; }
}

and im creating a sqlite database with:

dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "Database.sqlite");

//start dB
using (var db = new SQLite.SQLiteConnection(dbPath))
{
    db.CreateTable<artigos>();
}

but i get this error:

Don’t know about System.Collections.Generic.List`1[xxxxx.media]

Am i doing anything wrong?

 

 

————————————————-

Answer

Sqllite does not support lists. This means that you can´t have

public List<media> media { get; set; } 

c#,sqlite,windows-runtime,windows-store

Facebook Comments

Post a comment