Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
basic controller
public class NewsListPageController : PageController<NewsListPage>
{
private readonly INewsListPageModelFactory _newsListPageModelFactory;
public NewsListPageController(INewsListPageModelFactory newsListPageModelFactory)
{
_newsListPageModelFactory = newsListPageModelFactory;
}
//Remember to make it nullable since it's an optional paging.
public ActionResult Index(NewsListPage currentPage, int? page)
{
return View(_newsListPageModelFactory.Create(currentPage, page));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment