コード例 #1
0
        public ViewResult CategoryView(string searchString, int?page)
        {
            ViewBag.SearchCategory = searchString;

            var categories = _categoryDataProvider.GetCategoriesBySearchString(searchString);

            var pageSize   = 10;
            var pageNumber = (page ?? 1);

            var viewModel = new CategoryViewViewModel()
            {
                CategoryList = categories.ToPagedList(pageNumber, pageSize)
            };

            return(View(viewModel));
        }
コード例 #2
0
 public CategoryViewPage(CategoryViewViewModel viewModel)
 {
     InitializeComponent();
     BindingContext = this.viewModel = viewModel;
 }