私は次のクラスを持っています:
class Device
{
[AutoIncrement]
public int Id { get; set; }
public string Brand { get; set; }
public string Name { get; set; }
public string Price { get; set; }
public DeviceType Type { get; set; }
public Screen Display { get; set; }
}
enum DeviceType
{
Mobile, Tablet
};
class Screen
{
public List<string> Options { get; set; }
}
そうすることでデータを挿入できますが、
db.Insert(new Device { Name = "IPad2", Brand = "Apple", Price = "£450", Type = DeviceType.Tablet, Display = new Screen { Options = new List<string> { "opt1", "opt2", "opt3"} } });
Display
および表示データがとして列に追加されます{Options:[opt1,opt2,opt3]}
。今、私はフォロークエリを書くことに頭を悩ませることができません。
SELECT * FROM Device WHERE Display option "opt1" ;
助けてください。