61,112
社区成员
发帖
与我相关
我的任务
分享
<table class="table table-striped">
<thead>
<tr>
<th>LCID</th>
<th>English Name</th>
<th>Native Name</th>
<th>Culture types</th>
</tr>
</thead>
<tbody>
@foreach (var c in Model.CulturesList)
{
<tr>
<td>@c.LCID</td>
<td>@c.EnglishName</td>
<td>@c.NativeName</td>
<td>@c.CultureTypes</td>
</tr>
}
</tbody>
</table>
CulturesList = Cultures
//make sure to order items before paging
.OrderBy(x=>x.EnglishName)
//skip items before current page
.Skip((P-1)*S)
//take only 10 (page size) items
.Take(S)
//call ToList() at the end to execute the query and return the result set
.ToList();