WCF Xml Serialization

Oct 24 2015 3:35 PM
Dears
I'm working with asp .net (C#) , I need to create a web service, which will be having purchase request. 
 
How to create serializable classes with master detail relationship.
 
The input parameters will be like this,
 
   PurchaseRequest (Single Record)   -->   PurchaseItems (Multiple Records) -->   Itemspecification(single Record) 
 
Below is my xml 
 
<purchase>
<purchaserequest>
<reqid>req 1</reqid>
<reqddate>10/10/2005</reqddate>
<Items>
<itemcode>item 1</itemcode>
<itemname>item name 1</itemname>
<specification>
<size>Medium</size>
<color>blue</color>
<qty>10</qty>
</specification>
</Items>
<Items>
<itemcode>item 1</itemcode>
<itemname>item name 1</itemname>
<specification>
<size>Small</size>
<color>blue</color>
<qty>5</qty>
</specification>
</Items>
<Items>
<itemcode>item 2</itemcode>
<itemname>item name 2</itemname>
<specification>
<size>Small</size>
<color>blue</color>
<qty>10</qty>
</specification>
</Items>
</purchaserequest>
</purchase>
 Thanks & Regards
Suhesh 
 

Answers (3)