Example #1
0
        /// <summary>
        /// Create a new ProjectMember object.
        /// </summary>
        /// <param name="projectId">Initial value of the ProjectId property.</param>
        /// <param name="memberId">Initial value of the MemberId property.</param>
        /// <param name="roleId">Initial value of the RoleId property.</param>
        public static ProjectMember CreateProjectMember(global::System.String projectId, global::System.String memberId, global::System.String roleId)
        {
            ProjectMember projectMember = new ProjectMember();

            projectMember.ProjectId = projectId;
            projectMember.MemberId  = memberId;
            projectMember.RoleId    = roleId;
            return(projectMember);
        }
        public void SaveProjectMember(ScrumFactory.ProjectMember member)
        {
            using (var context = new Sql.ScrumFactoryEntities(this.connectionString))
            {
                var memberEntity = context.ProjectMembers.Where(m => m.ProjectId == member.ProjectId && m.MemberId == member.MemberId).SingleOrDefault();

                if (memberEntity == null)
                {
                    memberEntity = new ProjectMember { MemberId = member.MemberId, ProjectId = member.ProjectId, RoleId = member.RoleId };
                    context.AddToProjectMembers(memberEntity);
                }

                memberEntity.RoleId = member.RoleId;

                context.SaveChanges();
            }
        }
Example #3
0
        public void SaveProjectMember(ScrumFactory.ProjectMember member)
        {
            using (var context = new Sql.ScrumFactoryEntities(this.connectionString))
            {
                var memberEntity = context.ProjectMembers.Where(m => m.ProjectId == member.ProjectId && m.MemberId == member.MemberId).SingleOrDefault();

                if (memberEntity == null)
                {
                    memberEntity = new ProjectMember {
                        MemberId = member.MemberId, ProjectId = member.ProjectId, RoleId = member.RoleId
                    };
                    context.AddToProjectMembers(memberEntity);
                }

                memberEntity.RoleId = member.RoleId;

                context.SaveChanges();
            }
        }
Example #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProjectMembers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProjectMembers(ProjectMember projectMember)
 {
     base.AddObject("ProjectMembers", projectMember);
 }
 /// <summary>
 /// Create a new ProjectMember object.
 /// </summary>
 /// <param name="projectId">Initial value of the ProjectId property.</param>
 /// <param name="memberId">Initial value of the MemberId property.</param>
 /// <param name="roleId">Initial value of the RoleId property.</param>
 public static ProjectMember CreateProjectMember(global::System.String projectId, global::System.String memberId, global::System.String roleId)
 {
     ProjectMember projectMember = new ProjectMember();
     projectMember.ProjectId = projectId;
     projectMember.MemberId = memberId;
     projectMember.RoleId = roleId;
     return projectMember;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ProjectMembers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProjectMembers(ProjectMember projectMember)
 {
     base.AddObject("ProjectMembers", projectMember);
 }