title: LINQ: Return var-value?
body: <p>I have this code:</p>
  
  <pre><code>    public static List&lt;object&gt; GetInbox(Guid id)
      {
          using (Flirt4dateDBDataContext dc = new Flirt4dateDBDataContext())
          {
              List&lt;object&gt; query = from pm in dc.PrivateMessages
                          join user in dc.Users
                          on pm.Sender equals user.UserID 
                          select new
                          {
                              SenderName = user.Username
                          };
  
  
              return query;
  
          }
      }
  </code></pre>
  
  <p>It is not working.</p>
  
  <p>Error   1   Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Collections.Generic.List'. An explicit conversion exists (are you missing a cast?)  O:\Flirt4Date\Flirt4Date\DAL\PrivateMessageHandling.cs  69  29  DAL</p>
  
  <p>So, what to do?
  I know, a possible Option is to write a Class and give back a List of that, but I have houndrets of query like this and I would be pleased if I can have a generic solution...</p>