Beispiel #1
0
        public async Task <IActionResult> Update(int id)
        {
            var officeDto = await officeServices.GetAsync(id);

            var companyDtos = await companyServices.Get50Companies(0);

            var vm = mapper.Map <CreateOfficeViewModel>(officeDto);

            vm.Companies = companyDtos.Select(o => new SelectListItem(o.Name, o.ID.ToString())).ToList();

            return(View(vm));
        }