示例#1
0
        public IActionResult Category(int id)
        {
            var result = _Services.CategoriesPerKSIId(id).
                         Select(a => new CategoryViewModel
            {
                Id          = a.Id,
                Description = a.Description,
                Weight      = a.Weight
            }).ToList();
            var ksi   = _Services.GetKeySuccessIndicatorById(id);
            var model = new CategoryIndexViewModel
            {
                Categories     = result,
                KSIId          = ksi.Id,
                KSIDescription = ksi.Description
            };

            return(View(model));
        }