Esempio n. 1
0
        public async Task <IActionResult> Create(string projectId, TaskCreateViewModel newTaskVM)
        {
            int projId = _project.UnprotectProjectId(projectId);

            newTaskVM.Task.MemberId  = _member.GetMemberId(User);
            newTaskVM.Task.ProjectId = projId;

            Task newTask = await _task.AddAsync(newTaskVM.Task);

            Project project = await _project.GetProjectByIdAsync(projId);

            await _project.UpdateAsync(project);

            return(RedirectToAction("Index", new { projectId = projectId }));
        }