How to map sqlite tables and columns to c# classes in windows 8

淺唱寂寞╮ 提交于 2019-12-05 17:33:57

Ok I feel foolish... it turns out you have to set the table and column attributes on the class. eg

[Table("sometable")]
class Element
{
    [Column(Name = "id")]
    public int Id { get; set; }

    [Column("columnone")]
    public string PropertyOne {get; set;}

    [Column("columntwo")]
    public string PropertyTwo {get; set;}
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!