title: How to return a list from a method in C#
body: <p>How can I return a list that contains the result of a LINQ to SQLquery? I'm trying this implementation, but I got this error.</p>
  
  <blockquote>
    <p>Cannot implicitly convert type
    <code>'System.Collections.Generic.List&lt;AnonymousType#1&gt;'</code> to
    <code>'System.Collections.Generic.List&lt;object&gt;</code></p>
  </blockquote>
  
  <p>Any help would be appreciated.</p>
  
  <pre><code>public List&lt;Object&gt; getShoes() 
  {
      var query = from b in db.BrandTbls.AsQueryable()
                  join m in db.ShoeModelTbls on b.BrandID equals m.BrandID 
                  join s in db.ShoeTbls on m.ModelID equals s.ModelID 
                  join i in db.ShoeImageTbls on s.ShoeID equals i.ShoeID 
                  select new { s.ShoeID, s.Size, s.PrimaryColor, s.SecondaryColor, s.Quantity, m.ModelName, m.Price, b.BrandName, i.ImagePath };
  
      return query.ToList();
  }
  </code></pre>