Пример #1
0
        public RedirectToActionResult CreateProject(Project project)
        {
            Project           newProject    = _projectRepository.Add(project);
            ProjectAssignment newAssignment = new ProjectAssignment {
                ProjectId = newProject.ProjectId, UsersId = userManager.GetUserId(HttpContext.User)
            };

            _projectRepository.Assign(newAssignment);
            return(RedirectToAction("projectdetails", new { id = newProject.ProjectId }));
        }