Exemplo n.º 1
0
        public async Task <ActionResult> Edit(ProjectAdminViewModel projectViewModel)
        {
            if (ModelState.IsValid)
            {
                var project = _projectMapper.ToProject(projectViewModel);
                await _projectProvider.EditProjectAsync(project, projectViewModel.PortfolioId);

                return(RedirectToAction("Index"));
            }

            await DropDownListPortfoliosAsync(projectViewModel.PortfolioId);

            return(View(projectViewModel));
        }
Exemplo n.º 2
0
        public Project ToProject(ProjectAdminViewModel projectViewModel)
        {
            var project = _mapper.Map <ProjectAdminViewModel, Project>(projectViewModel);

            return(project);
        }