コード例 #1
0
        public IActionResult DelDeployment(string DeploymentId)
        {
            var document = _DeploymentService.Get(DeploymentId);

            if (document == null)
            {
                return(NotFound());
            }

            var document_toDisplay = new DeploymentToDisplay(document, _ProjectService, _DatabaseService, _Userservice);

            _DeploymentService.Remove(document.DeploymentId);

            var deployment_list = new List <DeploymentToDisplay>();

            deployment_list.Add(document_toDisplay);

            var viewModel = new ShowAllDeploymentViewModel()
            {
                DeploymentToDisplay_List = deployment_list
            };

            return(View(viewModel));
        }