I have a very simple application. MainUI has the List of CustomClass. I pass this list to WCF service. WCF Service further needs to save these objects in database.
I am using Open XML in our sql stored procedure to get better performnace. But i don’t know how to convert my List of Objects to XML.
If i have a datatable, it’ll be easy as datatables have methods to get the XML out of them. But how to use for List of objects.
I completly understand that if my List is coming over the WCF, it is getting serialized properly. But what should i exactly need to do.
IMO, look into Controlling XML Serialization with Attributes and the XmlSerializer class and possibly create container classes parallel to your CustomClass. While
List<>can’t be automatically serialized by the default XML serializer, an array can be.