title: How to serialize a protected property in wcf
body: <p>I have two classes (Person and Address) that i need to send via wcf, the classes look like this:</p>
  
  <pre><code>public class PersoanaFizica :IExtensibleDataObject
  {
      [DataMember]
      private Guid _id;
      [DataMember(Name = "Id")]
      protected virtual Guid Id
      {
          get { return _id; }
          set { _id = value; }
      }
  
      private ExtensionDataObject _extensionData;
      public virtual ExtensionDataObject ExtensionData
      {
          get
          {
              return _extensionData;
          }
          set
          {
              _extensionData = value;
          }
      }
  
  
      private string _firstName;
      [Searchable(PropertyName="FirstName")]
      [DataMember]
      public virtual string FirstName 
      {
          get { return this._firstName; }
          set { this._firstName = value; }
      }
  
      private string _lastName;
      [Searchable(PropertyName="LastName")]
      [DataMember]
      public virtual string LastName 
      {
          get { return this._lastName; }
          set { this. _lastName = value; }
      }
  
      private Address _address;
      [Searchable(PropertyName="Address")]
      [DataMember]
      public virtual Address Address 
      {
          get { return this._address; }
          set { this._address = value; }
      }
  }
  
  public class Address : IExtensibleDataObject
  {
   [DataMember]
      private Guid _id;
      [DataMember]
      public virtual Guid Id
      {
          get { return _id; }
          set { _id = value; }
      }
  
      private ExtensionDataObject _extensionData;
      public virtual ExtensionDataObject ExtensionData
      {
          get
          {
              return _extensionData;
          }
          set
          {
              _extensionData = value;
          }
      }
  
          private string _country;
      [Searchable(PropertyName="Country")]
      [DataMember]
      public virtual string Country 
      {
          get { return this._country; }
          set { this._country = value; }
      }
  // and some other properties related to the address
  }
  </code></pre>
  
  <p>The problem is that when i try to send them via wcf, the client receives the Id properties set to 00000-0000-00000-00000 or something like this.</p>
  
  <p>Any idea why this is happening? And how to serialize the proper values?</p>