title: Silverlight: Webservice method returning ObservableCollection instead of Generic List
body: <p>I have a webservice that calls a method that returns a generic list of class <code>BodyPartUrls</code> like so:</p>
  
  <pre><code>public List&lt;BodyPartUrls&gt; getCharacterClassBody(int characterClassID)
  {
      var bpulst = new List&lt;BodyPartUrls&gt;();
      var iqcb = ydc.ClassBodies.Where(cb =&gt;  cb.characterClassID == characterClassID);
  
      foreach (var icb in iqcb)
      {
          var bpu = new BodyPartUrls();
          bpu.bodyPartName = icb.BodyPart.bodyPartName;
          bpu.bodyName = icb.Body.bodyName;
          bpu.puppetID = characterClassID;
          bpulst.Add(bpu);
      }
      return bpulst;
  }
  </code></pre>
  
  <p>BodyPartUrls only consists of string and integer properties, note that ydc is refering to a datacontext. This the code in the webservice :</p>
  
  <pre><code>    [WebMethod]
      public List&lt;BodyPartUrls&gt; getCharacterClassBody(int characterClassID)
      {
         return b.getCharacterClassBody(characterClassID);
      }
  </code></pre>
  
  <p>Now to call the method in silverlight I utalised the following code :</p>
  
  <pre><code>public void initialiseBodiesSoapClientClient()
  {
      string webServiceUrl = pu.GetUrlForResource("Bodies.asmx");
      System.ServiceModel.BasicHttpBinding binding = new System.ServiceModel.BasicHttpBinding();
      EndpointAddress endpoint = new EndpointAddress(webServiceUrl);
      bsc = new BodiesRef.BodiesSoapClient(binding, endpoint);
      bsc.getCharacterClassBodyCompleted += new EventHandler&lt;Yambushi.BodiesRef.getCharacterClassBodyCompletedEventArgs&gt;(bsc_getCharacterClassBodyCompleted);
  }
  </code></pre>
  
  <p>The method <code>pu.GetUrlForResource</code> get's the url of where the webservice is hosted, the following is method <code>bsc_getCharacterClassBodyCompleted</code> :</p>
  
  <pre><code>void bsc_getCharacterClassBodyCompleted(object sender, Yambushi.BodiesRef.getCharacterClassBodyCompletedEventArgs e)
  {
     bpulist = e.Result;
  }
  </code></pre>
  
  <p><code>bpulist</code> is a generic list of BodyPartUrls, for some reason <code>e.Result</code> is returning ObservableCollection instead of the generic list. I have similar code to retreive other generic lists that work fine so I really can't understand why this is acting differently.</p>