public static Project ConvertToProject(CreateProjectDTO dto) { Project project = new Project(); project.Title = dto.Title; project.Description = dto.Description; project.DueDate = dto.DueDate; project.DateCreated = DateTime.Now; return project; }
public ActionResult CreateProject(CreateProjectDTO dto) { _projectService.CreateProject(dto); return RedirectToAction("Welcome", "Home"); }
public void CreateProject(CreateProjectDTO dto) { var project = ConvertToModel.ConvertToProject(dto); var user = (User)HttpContext.Current.Session["User"]; ProjectUser relation = new ProjectUser(); relation.UserId = user.Id; relation.isAdmin = true; relation.Project = project; _uWork.ProjectUserRepo.Create(relation); _uWork.ProjectUserRepo.Save(); }