Can I customize how a property is serialized to xml within a partial class?

80 Views Asked by At

I have a set of entities that are generated by the EF Reverse POCO Generator. Using the Audit Log feature of EntityFramework.Extended I can serialize changes to my entities to Xml except when the entity has a property of type DbGeography. In Reverse POCO, I've set the option DisableGeographyTypes=true so this property no longer gets generated and I've added a partial (non-generated) class and put the property in there instead.

Is there an attribute I can add to this property that will allow me to customize how it gets serialized to XML? Something like [SomeXmlAttribute(MyCustomSerializer)] where MyCustomSerializer is a class that will allow me to convert the data type to and from Xml?

0

There are 0 best solutions below