Esempio n. 1
0
        [HttpPost]  //Add .....>    /api/ApiProject/APIInsertProjectManager
        public async Task <IActionResult> APIInsertProjectManager([FromBody] UserDto ProjectManagerDto)
        {
            if (ModelState.IsValid)
            {
                await ProjectManagerRep.InsertProjectManager(ProjectManagerDto);

                return(RedirectToAction("APIShowProjectManagers"));
            }
            else
            {
                return(RedirectToAction("APIShowProjectManagers"));
            }
        }
        public async Task <IActionResult> InsertProjectManager(UserDto ProjectManagerDto)
        {
            if (ModelState.IsValid)
            {
                await ProjectManagerRep.InsertProjectManager(ProjectManagerDto);

                return(RedirectToAction("ShowProjectManagers"));
            }
            else
            {
                return(View("CreatProjectManager"));
            }
        }