2012-01-06 5 views
0

変数としてEF POCOを持つワークフローを永続化しようとしています。オブジェクトをシリアライズしようとすると、エラーが発生します。ワークフローの持続性におけるPOCO EFオブジェクトの直列化

Type 'System.Collections.Generic.ICollection`1[MyObject]' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

これを回避する方法はありますか。

答えて

0

これをリストにすることはおそらく、これを回避する最も簡単な方法です。問題は、それが私がここで答えを見つけることがあなたのコレクション

+0

コメントをしていただけますか?私はワークフローの外でそれをシリアル化することができますので、データ契約シリアライザが動作するようです。 – user472292

関連する問題