我正在尝试保存这个简单的类,但MongoDB不接受。
public class CredentialSet
{
public CredentialSet()
{
this.Items = new ObservableCollection<CredentialSet>();
}
[BsonId]
public ObjectId _id { get; set; }
public string Title { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string WebSite { get; set; }
public string Notes { get; set; }
public int Owner { get; set; }
public DateTime LastUpdate { get; set; }
public ObservableCollection<CredentialSet> Items { get; set; }
public CredentialSet parent { get; set; }
}
超出了最大序列化深度(被序列化的对象是否具有循环引用?)。
如何解决?
答案 0 :(得分:0)