コード例 #1
0
        public ViewResult List(string category, int page = 1)
        {
            PigeonListViewModel model = new PigeonListViewModel
            {
                Pigeons    = repository.GetByCategory(category, page, pageSize),
                PagingInfo = new PagingInfo
                {
                    CurrentPage  = page,
                    ItemsPerPage = pageSize,
                    TotalItems   = repository.Count(category)
                },
                CurrentCategory = category
            };

            return(View(model));
        }