Beispiel #1
0
        public void GetResourceStars()
        {
            ResourceStarService  resourceStarCRUD = new ResourceStarService();
            IList <ResourceStar> resourceStars    = resourceStarCRUD.GetResourceStars();

            Assert.IsNotNull(resourceStars);
        }
Beispiel #2
0
        public ActionResult List(int page = 1)
        {
            PageModel pagemodel = new PageModel(Constant.PAGESIZE, page, resourceStarCRUD.GetCount());

            pagemodel.actionName     = "List";
            pagemodel.controllerName = "ResourceStar";
            ViewBag.pagemodel        = pagemodel;

            var resourceStars = resourceStarCRUD.GetResourceStars(page);
            IEnumerable <ResourceStarModel> resourceStarModels = resourceStars.Select(x => x.ToModel());

            return(View("Index", resourceStarModels));
        }