Skip to content

Instantly share code, notes, and snippets.

@gabbsmo
Created March 4, 2013 19:46
Show Gist options
  • Save gabbsmo/5084936 to your computer and use it in GitHub Desktop.
Save gabbsmo/5084936 to your computer and use it in GitHub Desktop.
@if(Model != null) {
<table>
<thead>
<tr>
<th>Title</th>
<th>Rating</th>
<th>Year</th>
<th>Votes</th>
<th>Categories</th>
</tr>
</thead>
@foreach (var item in Model.DescendantsAndSelf("Movie")) {
<tr>
<td>@item.Element("Title").Value</td>
<td>@item.Element("Rating").Value</td>
<td>@item.Element("Year").Value</td>
<td>@item.Element("UserVotes").Value</td>
<td>
@foreach (var item2 in @item.Element("Categories").Descendants())
{
@(item2.Value + ", ")
}
</td>
</tr>
}
</table>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment