public PlansListModel List(PagingCommand command) { var plans = _planRepository.FetchPaged(q => q.OrderBy(t => t.OrderIndex), command.PageIndex, command.PageSize); var model = new PlansListModel { Plans = Mapper.Engine.MapPaged <Plan, PlansListModel.PlanSummary>(plans) }; return(model); }
public ActionResult Index(PagingCommand command) { PlansListModel model = _planService.List(command); return(View(model)); }