public void SaveAssignment()
        {
            var projectUser = new ProjectUser
            {
                UserId        = UserId,
                ProjectId     = Id,
                ProjectRoleId = RoleId
            };

            ProjectManagementService.AssingRole(projectUser);
        }
        public void Save(int creatorId)
        {
            var project = new Project
            {
                Id           = ProjectId,
                Title        = Title,
                Details      = Details,
                CreatorId    = creatorId,
                DateOfChange = DateTime.Today
            };

            //if (project.Id == 0)
            //{
            //    if (new ProjectManagementService().GetProjects().Count(e => e.Title == project.Title) != 0)
            //    {
            //    }
            //}
            //else
            //{
            //    if (
            //        new ProjectManagementService().GetProjects()
            //            .Count(e => e.Title == project.Title && e.Id != project.Id) != 0)
            //    {
            //    }
            //    else
            //    {
            ProjectManagementService.SaveProject(project);

            if (ProjectId == 0)
            {
                ProjectManagementService.AssingRole(new ProjectUser
                {
                    UserId        = creatorId,
                    ProjectId     = project.Id,
                    ProjectRoleId = 3
                });
            }

            //    }
            //}
        }
        public void Save(int creatorId)
        {
            var project = new Project
            {
                Id           = ProjectId,
                Title        = Title,
                Details      = Details,
                CreatorId    = creatorId,
                DateOfChange = DateTime.Today
            };

            ProjectManagementService.SaveProject(project);

            if (ProjectId == 0)
            {
                ProjectManagementService.AssingRole(new ProjectUser
                {
                    UserId        = creatorId,
                    ProjectId     = project.Id,
                    ProjectRoleId = 3
                });
            }
        }