将对象列表保存到本地数据库 - Windows Phone 8

时间:2014-01-13 22:47:55

标签: database list windows-phone

我想将数据从对象保存到本地数据库。如果我从课堂上添加字段很简单:

[Table]
public Class XXX{
public string _id;


        [Column(IsPrimaryKey = true, IsDbGenerated = false, DbType = "NVarChar(10) NOT NULL", CanBeNull = false, AutoSync = AutoSync.OnInsert)]
    public string id
    {
        get
        {
            return _id;
        }
        set
        {
            if (_id != value)
            {
                NotifyPropertyChanging("id");
                _id = value;
                NotifyPropertyChanged("id");
            }
        }
    }


}

但是如果我的班级看起来我该怎么做?

public class XXX
{

 public List<MyClass> objects;

}

0 个答案:

没有答案