title: Get rid of d2p1 in XML created with DataContract in Serialized Class
body: <p>i have the following class in C#.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using Iesi.Collections.Generic;
  using System.Runtime.Serialization;
  
  namespace PostIt.Models.Core
  {
      [Serializable]
      [DataContract(Name = "Order")]
      public partial class Order
      {
  
          [DataMember]
          public virtual DateTime CreationDate
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual string ReceiverName
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual string Status
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual int TrackingNumber
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual Address Origin
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual Address Destiny
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual IList&lt;Invoice&gt; Invoices
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual IList&lt;Package&gt; Packages
          {
              get;
              set;
          }
  
          [DataMember]
          public virtual IList&lt;Stop&gt; Stops
          {
              get;
              set;
          }
  
          /// &lt;summary&gt;
          /// Creador de la orden
          /// &lt;/summary&gt;
          [DataMember]
          public virtual int IdPerson
          {
              get;
              set;
          }
  
          /// &lt;summary&gt;
          /// Ruta a la que pertenece
          /// &lt;/summary&gt;
          [DataMember]
          public virtual int? IdRoute
          {
              get;
              set;
          }
  
          public Order()
          {
              Invoices = new List&lt;Invoice&gt;();
              Packages = new List&lt;Package&gt;();
              Stops = new List&lt;Stop&gt;();
          }
  
          public Order(int idRoute)
          {
              IdRoute = idRoute;
              Invoices = new List&lt;Invoice&gt;();
              Packages = new List&lt;Package&gt;();
              Stops = new List&lt;Stop&gt;();
          }
  
          public override bool Equals(object obj)
          {
              if (ReferenceEquals(this, obj))
                  return true;
  
              return Equals(obj as Order);
          }
  
          public virtual bool Equals(Order obj)
          {
              if (obj == null) return false;
  
              if (Equals(CreationDate, obj.CreationDate) == false) return false;
              if (Equals(ReceiverName, obj.ReceiverName) == false) return false;
              if (Equals(Status, obj.Status) == false) return false;
              if (Equals(TrackingNumber, obj.TrackingNumber) == false) return false;
              return true;
          }
  
          public override int GetHashCode()
          {
              int result = 1;
  
              result = (result * 397) ^ (CreationDate != null ? CreationDate.GetHashCode() : 0);
              result = (result * 397) ^ (ReceiverName != null ? ReceiverName.GetHashCode() : 0);
              result = (result * 397) ^ (Status != null ? Status.GetHashCode() : 0);
              result = (result * 397) ^ TrackingNumber.GetHashCode();
              return result;
          }
  
          /// &lt;summary&gt;
          /// Retorna la suma del volumen de los paquetes de la orden
          /// &lt;/summary&gt;
          /// &lt;returns&gt;Volumen total&lt;/returns&gt;
          public virtual double TotalVolume()
          {
              double volume = 0;
  
              foreach(Package item in Packages)
              {
  
                  volume += (double) item.Volume();
              }
  
              return volume;
  
          }
  
          /// &lt;summary&gt;
          /// Retorna la suma del peso de los paquetes de la orden
          /// &lt;/summary&gt;
          /// &lt;returns&gt;Peso total&lt;/returns&gt;
          public virtual double TotalWeight()
          {
              double weight = 0;
  
              foreach (Package item in Packages)
              {
  
                  weight += (double)item.Weight;
              }
  
              return weight;
  
          }
  
      }
  }
  </code></pre>
  
  <p>I'm building a REST web service with ASP.NET MVC 3. So i need to serialize this class in a XML and send it to the client. The problem is that i'm getting an annoying "d2p1" in every element of the XML. Here is an example of the response:</p>
  
  <pre><code>&lt;RequestResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PostIt.Result"&gt;
  &lt;Data i:type="d2p1:Order" xmlns:d2p1="http://schemas.datacontract.org/2004/07/PostIt.Models.Core"&gt;
      &lt;d2p1:CreationDate&gt;2013-04-27T00:00:00&lt;/d2p1:CreationDate&gt;
      &lt;d2p1:Destiny&gt;
          &lt;d2p1:Alias&gt;La Casa del Lago&lt;/d2p1:Alias&gt;
          &lt;d2p1:City&gt;Caracas&lt;/d2p1:City&gt;
          &lt;d2p1:Country&gt;Venezuela&lt;/d2p1:Country&gt;
          &lt;d2p1:HouseName&gt;Qta. Frescia&lt;/d2p1:HouseName&gt;
          &lt;d2p1:HouseNumber&gt;20&lt;/d2p1:HouseNumber&gt;
          &lt;d2p1:IdAddress&gt;2&lt;/d2p1:IdAddress&gt;
          &lt;d2p1:IdPerson&gt;1&lt;/d2p1:IdPerson&gt;
          &lt;d2p1:InUse&gt;false&lt;/d2p1:InUse&gt;
          &lt;d2p1:Latitude&gt;10.49102&lt;/d2p1:Latitude&gt;
          &lt;d2p1:Longitude&gt;-66.90206&lt;/d2p1:Longitude&gt;
          &lt;d2p1:Street&gt;Av. Principal Santa Marta&lt;/d2p1:Street&gt;
          &lt;d2p1:Urbanization&gt;Santa Marta&lt;/d2p1:Urbanization&gt;
          &lt;d2p1:ZipCode&gt;1061&lt;/d2p1:ZipCode&gt;
      &lt;/d2p1:Destiny&gt;
      &lt;d2p1:IdPerson&gt;1&lt;/d2p1:IdPerson&gt;
      &lt;d2p1:IdRoute&gt;1&lt;/d2p1:IdRoute&gt;
      &lt;d2p1:Invoices/&gt;
      &lt;d2p1:Origin&gt;
          &lt;d2p1:Alias&gt;Mi casa&lt;/d2p1:Alias&gt;
          &lt;d2p1:City&gt;Caracas&lt;/d2p1:City&gt;
          &lt;d2p1:Country&gt;Venezuela&lt;/d2p1:Country&gt;
          &lt;d2p1:HouseName&gt;Qta. Frescia&lt;/d2p1:HouseName&gt;
          &lt;d2p1:HouseNumber&gt;20&lt;/d2p1:HouseNumber&gt;
          &lt;d2p1:IdAddress&gt;1&lt;/d2p1:IdAddress&gt;
          &lt;d2p1:IdPerson&gt;1&lt;/d2p1:IdPerson&gt;
          &lt;d2p1:InUse&gt;true&lt;/d2p1:InUse&gt;
          &lt;d2p1:Latitude&gt;48.89364&lt;/d2p1:Latitude&gt;
          &lt;d2p1:Longitude&gt;2.33739&lt;/d2p1:Longitude&gt;
          &lt;d2p1:Street&gt;Av. Principal Santa Marta&lt;/d2p1:Street&gt;
          &lt;d2p1:Urbanization&gt;Santa Marta&lt;/d2p1:Urbanization&gt;
          &lt;d2p1:ZipCode&gt;1061&lt;/d2p1:ZipCode&gt;
      &lt;/d2p1:Origin&gt;
      &lt;d2p1:Packages&gt;
          &lt;d2p1:Package&gt;
          &lt;d2p1:Content&gt;Electronicos&lt;/d2p1:Content&gt;
          &lt;d2p1:Height&gt;10.2&lt;/d2p1:Height&gt;
          &lt;d2p1:IdPackage&gt;1&lt;/d2p1:IdPackage&gt;
          &lt;d2p1:OrderTrackingNumber&gt;1957437&lt;/d2p1:OrderTrackingNumber&gt;
          &lt;d2p1:Thicknes&gt;1.3&lt;/d2p1:Thicknes&gt;
          &lt;d2p1:Weight&gt;2&lt;/d2p1:Weight&gt;
          &lt;d2p1:Width&gt;5.3&lt;/d2p1:Width&gt;
          &lt;/d2p1:Package&gt;
          &lt;d2p1:Package&gt;
          &lt;d2p1:Content&gt;Electronicos&lt;/d2p1:Content&gt;
          &lt;d2p1:Height&gt;4.8&lt;/d2p1:Height&gt;
          &lt;d2p1:IdPackage&gt;2&lt;/d2p1:IdPackage&gt;
          &lt;d2p1:OrderTrackingNumber&gt;1957437&lt;/d2p1:OrderTrackingNumber&gt;
          &lt;d2p1:Thicknes&gt;3.4&lt;/d2p1:Thicknes&gt;
          &lt;d2p1:Weight&gt;8&lt;/d2p1:Weight&gt;
          &lt;d2p1:Width&gt;9.2&lt;/d2p1:Width&gt;
          &lt;/d2p1:Package&gt;
          &lt;d2p1:Package&gt;
          &lt;d2p1:Content&gt;Electronicos&lt;/d2p1:Content&gt;
          &lt;d2p1:Height&gt;15.1&lt;/d2p1:Height&gt;
          &lt;d2p1:IdPackage&gt;3&lt;/d2p1:IdPackage&gt;
          &lt;d2p1:OrderTrackingNumber&gt;1957437&lt;/d2p1:OrderTrackingNumber&gt;
          &lt;d2p1:Thicknes&gt;2.6&lt;/d2p1:Thicknes&gt;
          &lt;d2p1:Weight&gt;6&lt;/d2p1:Weight&gt;
          &lt;d2p1:Width&gt;3.3&lt;/d2p1:Width&gt;
          &lt;/d2p1:Package&gt;
      &lt;/d2p1:Packages&gt;
      &lt;d2p1:ReceiverName&gt;Pepito&lt;/d2p1:ReceiverName&gt;
      &lt;d2p1:Status&gt;Recolectada&lt;/d2p1:Status&gt;
      &lt;d2p1:Stops&gt;
          &lt;d2p1:Stop&gt;
          &lt;d2p1:Alias&gt;La esquina del mono&lt;/d2p1:Alias&gt;
          &lt;d2p1:City&gt;Barcelona&lt;/d2p1:City&gt;
          &lt;d2p1:Country&gt;Espana&lt;/d2p1:Country&gt;
          &lt;d2p1:IdOrder&gt;1957437&lt;/d2p1:IdOrder&gt;
          &lt;d2p1:IdStop&gt;1&lt;/d2p1:IdStop&gt;
          &lt;d2p1:State&gt;Catalunia&lt;/d2p1:State&gt;
          &lt;/d2p1:Stop&gt;
          &lt;d2p1:Stop&gt;
          &lt;d2p1:Alias&gt;Al lado de Farmatodo&lt;/d2p1:Alias&gt;
          &lt;d2p1:City&gt;Caracas&lt;/d2p1:City&gt;
          &lt;d2p1:Country&gt;Venezuela&lt;/d2p1:Country&gt;
          &lt;d2p1:IdOrder&gt;1957437&lt;/d2p1:IdOrder&gt;
          &lt;d2p1:IdStop&gt;2&lt;/d2p1:IdStop&gt;
          &lt;d2p1:State&gt;Distrito Capital&lt;/d2p1:State&gt;
          &lt;/d2p1:Stop&gt;
          &lt;d2p1:Stop&gt;
          &lt;d2p1:Alias&gt;La parada Loca&lt;/d2p1:Alias&gt;
          &lt;d2p1:City&gt;San Diego&lt;/d2p1:City&gt;
          &lt;d2p1:Country&gt;USA&lt;/d2p1:Country&gt;
          &lt;d2p1:IdOrder&gt;1957437&lt;/d2p1:IdOrder&gt;
          &lt;d2p1:IdStop&gt;3&lt;/d2p1:IdStop&gt;
          &lt;d2p1:State&gt;California&lt;/d2p1:State&gt;
          &lt;/d2p1:Stop&gt;
      &lt;/d2p1:Stops&gt;
      &lt;d2p1:TrackingNumber&gt;1957437&lt;/d2p1:TrackingNumber&gt;
  &lt;/Data&gt;
  &lt;ErrorCode&gt;1&lt;/ErrorCode&gt;
  &lt;Message&gt;SUCCESS&lt;/Message&gt;
  &lt;/RequestResult&gt;
  </code></pre>
  
  <p>How do i get rid of the d2p1?</p>