title: creating a class within a class and returning data from database
body: <p>I created a class within a class so it could be an alternative to writing 3 different methods calling
            to the database- so i created a class with related items and now when i try to build i get the error
            <code>Cannot implicity convert type System.collections.generic.list&lt;anonymousType#1&gt; to class that i created StudentDocuments</code>
            and when i click on the error it directs me to the <code>return subs</code> statement.</p>
  
  <pre><code>public class  StudentDocuments
      {
          public Guid DocID {get; set;}
          public string Assignment {get; set;}
          public DateTime Submitted {get; set;}
          public string Student {get;set;}
      }
  
  
  
  
  public StudentDocuments GetStudentSubmissionGrid(Guid usr, Guid lib)
      {
          using (var dc = new DocMgmtDataContext())
          {
              var subs = (from doc in dc.Documents
                          join u in dc.Users on doc.OwnedByUserID equals u.ID
                          where doc.OwnedByUserID == usr &amp;&amp; doc.LibraryID == lib
                          select new { 
                              DocID = doc.ID, 
                              Assignment = doc.Library.Name, 
                              Submitted = doc.UploadDT,
                              Student = u.FullName
                          })
                  .OrderByDescending(c =&gt; c.Submitted).ToList();
              return subs;
          }
      }
  </code></pre>