Pagination
Pagination
@using PagedList
@using PagedList.Mvc
@model IPagedList<QuirkyBookRental.Models.Genre>
<h2>Genre</h2>
@Html.Partial("_CreateButtonPartial")
<br />
<br />
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>
@Html.DisplayNameFor(m => m.First().Name)
</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(m => item.Name)
</td>
<td class="text-center">
@Html.ActionLink("Edit", "Edit", "Genre", new { id = item.GenreId }, null)
</td>
</tr>
}
<tr>
</tr>
</tbody>
</table>
@Html.PagedListPager(Model, Page => Url.Action("Index", new { Page }))
@*Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount
@Html.PagedListPager(Model, page => Url.Action("Index", new { page }))*@
@*, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter }))*@