Esempio n. 1
0
        public ActionResult List()
        {
            var model = portfolioCategoryService.GetCategories().Select(x => new PortfolioCategoryModel
            {
                Id             = x.Id,
                Name           = x.Name,
                IsActive       = x.IsActive,
                PortfolioCount = portfolioService.GetCount(x.Id)
            }).ToList();

            return(View(new GridModel <PortfolioCategoryModel>
            {
                Data = model,
                Total = model.Count()
            }));
        }