コード例 #1
0
        public IActionResult Index()
        {
            var result = _Company.Companies().Select
                         (
                a => new CompanyViewModel
            {
                Id          = a.Id,
                Description = a.Description
            }
                         ).ToList();
            var model = new CompanyIndexViewModel();

            model.Companies = result;
            return(View(model));
        }