title: LINQ entity results to List<string>
body: <p>I have a query which returns only a column from an entity in silverlight4 domainservice. How do I cast the results into a List?</p>
  
  <pre><code>public List&lt;string&gt; GetDataForTags() 
  {
      var result =  from d in this.ObjectContext.vwBusinessUnits
                    select d.BusinessLineID.Distinct();
      return result;
  }   
  </code></pre>
  
  <p>I try using </p>
  
  <pre><code>return result as List&lt;ToList();
  </code></pre>
  
  <p>and</p>
  
  <pre><code>return result.Cast&lt;string&gt;().ToList();
  </code></pre>
  
  <p>but I get a cannot implicitly convert type error from <code>Generic.IEnumerable&lt;string&gt;</code> to <code>Generic.List&lt;string&gt;</code></p>
  
  <p>Currently I'm able to convert using</p>
  
  <pre><code> var result =  from d in this.ObjectContext.vwBusinessUnits
                           select d.BusinessLineID;
              return result.Distinct().ToList();  
  </code></pre>
  
  <p>I am trying to use this result in the view model but am getting a conversion error</p>
  
  <pre><code> private void LoadBUGroupTags()
      {
          TagsData = SecurityDomainContext.Current.GetDataForTags();
      }
  </code></pre>
  
  <blockquote>
    <p>Error 1   Cannot implicitly convert type
    'System.ServiceModel.DomainServices.Client.InvokeOperation>'
    to
    'System.Collections.Generic.List' </p>
  </blockquote>
  
  <p>and TagsData is just a public property</p>
  
  <pre><code>public List&lt;string&gt; TagsData 
          {
              get 
              {
                  return _tags;
              }
              set
              {
                  if (_tags != value)
                  {
                      _tags = value;
                   OnNotifyPropertyChanged("TagsData");
                  }
              }
          }
  </code></pre>