ProjectUserSave() public static method

public static ProjectUserSave ( ProjectUser projectUser ) : ProjectUser
projectUser ProjectUser
return ProjectUser
        public static ProjectUser ProjectUserAdd(int projectId, int userId, Role role)
        {
            var projectUser = ProjectUser.NewProjectUser(projectId, userId);

            projectUser.RoleId = (int)role;

            projectUser = ProjectUserRepository.ProjectUserSave(projectUser);

            return(projectUser);
        }
        internal static ProjectUser ProjectUserAdd(int projectId, int userId, Role role, bool ignoreAuthorization)
        {
            var projectUser = ProjectUser.NewProjectUser(projectId, userId);

            projectUser.RoleId = (int)role;

            if (ignoreAuthorization)
            {
                projectUser = ProjectUserRepository.ProjectUserInsert(projectUser);
            }
            else
            {
                projectUser = ProjectUserRepository.ProjectUserSave(projectUser);
            }

            return(projectUser);
        }