Sharepoint 2010我需要将对象列表存储到数据库中

时间:2011-04-19 13:39:51

标签: c# sharepoint-2010 sharepoint-api

我需要将几个对象(非简单类型)存储到sharepoint并从所有站点访问它们。我的第一次尝试是使用SPPersistedObject保存,但无法保存列表:

he platform does not know how to deserialize an object of type DataItems.SearchResultItem. The platform can deserialize primitive types such as strings, integers, and GUIDs; other SPPersistedObjects or SPAutoserializingObjects; or collections of any of the above. Consider redesigning your objects to store values in one of these supported formats, or contact your software vendor for support.

我该怎么做?

2 个答案:

答案 0 :(得分:1)

你究竟想要保存什么?是否可以将其简化为具有不同列的SharePoint列表,这些列代表您要保存的全部内容?

答案 1 :(得分:1)

解决方案是存储SPPersistedObject并将对象序列化为xml字符串。