page --> pageNumber in dynamic linq snippet (#12308)
parent
ec9776e093
commit
f13d94aff5
|
@ -149,7 +149,7 @@ namespace ContosoUniversity.Controllers
|
||||||
string sortOrder,
|
string sortOrder,
|
||||||
string currentFilter,
|
string currentFilter,
|
||||||
string searchString,
|
string searchString,
|
||||||
int? page)
|
int? pageNumber)
|
||||||
{
|
{
|
||||||
ViewData["CurrentSort"] = sortOrder;
|
ViewData["CurrentSort"] = sortOrder;
|
||||||
ViewData["NameSortParm"] =
|
ViewData["NameSortParm"] =
|
||||||
|
@ -159,7 +159,7 @@ namespace ContosoUniversity.Controllers
|
||||||
|
|
||||||
if (searchString != null)
|
if (searchString != null)
|
||||||
{
|
{
|
||||||
page = 1;
|
pageNumber = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@ namespace ContosoUniversity.Controllers
|
||||||
|
|
||||||
int pageSize = 3;
|
int pageSize = 3;
|
||||||
return View(await PaginatedList<Student>.CreateAsync(students.AsNoTracking(),
|
return View(await PaginatedList<Student>.CreateAsync(students.AsNoTracking(),
|
||||||
page ?? 1, pageSize));
|
pageNumber ?? 1, pageSize));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue