title: Using Linq to create a collection of a custom class from a DbSet that contains a list of grouped entities
body: <h1>Given a data set which looks something like:</h1>
  
  <pre><code>Iqueryable&lt;photos&gt; which represents the following table in a database
  
  DataTable table = new DataTable("Trip");
  table.Columns.Add("Date", typeof(string));
  table.Columns.Add("Location", typeof(string));
  table.Columns.Add("PhotoName", typeof(string));
  
  table.Rows.Add("1/1/2001", "Home", "Photo1.jpg");
  table.Rows.Add("1/1/2001", "Home", "Photo2.jpg");
  table.Rows.Add("1/2/2001", "Work", "Photo3.jpg");
  table.Rows.Add("1/2/2001", "Work", "Photo4.jpg");
  table.Rows.Add("1/3/2001", "Home", "Photo5.jpg");
  </code></pre>
  
  <h1>I want to create a collection of the following class which is grouped by Date & Location:</h1>
  
  <pre><code> class PhotoCollection
   { 
        string date;
        string location;
        IList&lt;string&gt; namesOfPhotos;
   }
  </code></pre>
  
  <h1> I started with: </h1>
  
  <pre><code> from photo in photos
   group photo by new { photo.date, photo.location };
  </code></pre>
  
  <h1>Question:</h1>
  
  <p>Now that the items are grouped is it possible to neatly create a collection of PhotoCollection inline?</p>