title: LINQ, ASP.net mvc and joins
body: <p>I am making an application usign MVC and LINQ.</p>
  
  <p>I have a controller called home which does this:</p>
  
  <pre><code>    Dim notes = From x In dal.tbl_notes _
                  Join y In dal.tbl_note_users On y.user_id Equals x.note_id _
                  Select x.note, x.datestamp, y.is_owner, y.note_user_id
      ViewData("notes") = notes
      Return View()
  </code></pre>
  
  <p>And a page called home which has this code for displaying the output:</p>
  
  <pre><code>&lt;%  For Each note In ViewData("notes")%&gt;
      &lt;%=Html.Encode(note.ToString)%&gt;
  &lt;% next %&gt;
  </code></pre>
  
  <p>However, the output looks like this:</p>
  
  <p>{ note = vbnv, datestamp = , is_owner = True, note_user_id = 1 }</p>
  
  <p>How can i output individual columns (like note or datestamp)? Is there a better way of doing this?</p>
  
  <p>I have tried using viewdata.model but the data is from two different tables, so i can't say what type it is.</p>
  
  <p>Thanks</p>