In WCF, if I have code like this and I'm returning it in XML format, the XML is auto generated. Is it possible for me to expicitly specify which XML will be used for the serialization of the CustomerEntity?
[OperationContract]
[WebInvoke(Method = "GET"]
CustomerEntity GetCustomer(int customerPk);
The alternative that I'm currently using is to return an XElement, but the problem with this is that I can't also support JSon that way.
Update: My types are immutable and use raedonly properties, so IXmlSerializable won't work for me.