我想将数据从对象保存到本地数据库。如果我从课堂上添加字段很简单:
[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;
}