コード例 #1
0
 // The return type can be changed to IEnumerable, however to support
 // paging and sorting, the following parameters must be added:
 //     int maximumRows
 //     int startRowIndex
 //     out int totalRowCount
 //     string sortByExpression
 public IQueryable<Order> GridViewOrders_GetData([Control] int? gridViewEmployees)
 {
     Thread.Sleep(2000);
     var db = new NorthwindEntities();
     return db.Orders.Where(o => o.EmployeeID == gridViewEmployees);
 }
コード例 #2
0
 // The return type can be changed to IEnumerable, however to support
 // paging and sorting, the following parameters must be added:
 //     int maximumRows
 //     int startRowIndex
 //     out int totalRowCount
 //     string sortByExpression
 public IQueryable<Employee> GridViewEmployees_GetData()
 {
     var db = new NorthwindEntities();
     return db.Employees;
 }