Bài đăng

Đang hiển thị bài đăng từ tháng 6 10, 2014

Sorting, Filtering, and Paging with the Entity Framework in an ASP.NET MVC Application By Tom Dykstra

Hình ảnh
Download Completed Project or Download PDF The Contoso University sample web application demonstrates how to create ASP.NET MVC 5 applications using the Entity Framework 6 Code First and Visual Studio 2013. For information about the tutorial series, see the first tutorial in the series . In the previous tutorial you implemented a set of web pages for basic CRUD operations for Student entities. In this tutorial you'll add sorting, filtering, and paging functionality to the Students Index page. You'll also create a page that does simple grouping. The following illustration shows what the page will look like when you're done. The column headings are links that the user can click to sort by that column. Clicking a column heading repeatedly toggles between ascending and descending sort order. Add Column Sort Links to the Students Index Page To add sorting to the Student Index page, you'll change the Index method of the Student controller and add