1
Vote

cannot serialize EditableMemeberInfoCollection

description

hello,
i am tring to cearte an expression, serialize it and then save it to my db.
the expression is like this:
 
Expression<Func<Person,List<Address>>> exp = (person) => person.HasAddress ? person.Addresses.ToList() : new List<Address>();
 
then i serialize it using DataContactSerializer.
up until now every thing is working fine.
 
i am deserializing it from the DB and save it in velocity cache,
then i am getting this expection:
"Type 'Address' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute"
 
any idea?
thanks!

comments