예제 #1
0
        public IActionResult Index()
        {
            var result = _Branch.Branches().Select
                         (
                a => new BranchViewModel
            {
                Id          = a.Id,
                Description = a.Description,
                Company     = a.Company.Description
            }
                         ).ToList();
            var model = new BranchIndexViewModel
            {
                Branches  = result,
                Companies = this.CompanyList()
            };

            return(View(model));
        }