I'm working on an MVC3 application. I created my POCO classes through the ADO.NET DbContext Generator and I'm using partial classes to add validation on properties. Now, when I try to serialize one of my entities I receive this error:
"Cannot serialize member .... of type 'System.Collections.Generic.ICollection`1[....."
I googled this error and I discovered that it's possible to add the tag
[XmlIgnore]
to certain properties.
But the point is that I can't put this tag on the properties because they are
created everytime by the generator.
So how I can do this in a simpler way ?