コード例 #1
0
        public ActionResult CategoryDetail(PageFilterModel paging)
        {
            ProductDataContext   db = new ProductDataContext();
            List <CategoryModel> lloCategoryModel = new List <CategoryModel>();

            try
            {
                var categoryobj = db.SP_SELECTCategory(paging.PageNo, paging.PageSize);
                foreach (var item in categoryobj)
                {
                    lloCategoryModel.Add(new CategoryModel {
                        CategoryID = item.CategoryId, CategoryName = item.CategoryName
                    });
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(View(lloCategoryModel));
        }