public void AddContributor(ProjectContributor contributor) { if (!Contributors.Any(v => v.UserId == UserId)) { Contributors.Add(contributor); AddDomainEvent(new ProjectJoinedEvent { Contributor = contributor }); } }
public void AddContributor(ProjectContributor contributor) { if (!Contributors.Any(v => v.UserId == contributor.UserId)) { Contributors.Add(contributor); AddDomainEvent(new ProjectJoinedEvent { Contributor = contributor, Avatar = Avatar, Company = Company, Introduction = Introduction }); } }
public void AddContributor(ProjectContributor contributor) { if (!this.Contributors.Any(x => x.UserId == contributor.UserId)) { this.Contributors.Add(contributor); this.AddDomainEvent(new ProjectJoinedEvent() { Contributor = contributor }); } }
public void AddContributor(ProjectContributor contributor) { if (ProjectContributors.Any(x => x.UserId == contributor.UserId)) { return; } ProjectContributors.Add(contributor); AddDomainEvent(new ProjectJoinedEvent() { ProjectContributor = contributor }); }
public void AddContributor(ProjectContributor contributor) { if (!Contributors.Any(v => v.UserId == UserId)) { Contributors.Add(contributor); AddDomainEvent(new ProjectJoinedEvent() { Company = this.Company, Introduction = this.Introduction, Contributor = contributor }); } }
public void AddContributor(ProjectContributor projectContributor) { if (!this.Contributors.Any(v => v.UserId == projectContributor.UserId)) { this.Contributors.Add(projectContributor); this.AddDomainEvent(new ProjectJoinedEvent { ProjectContributor = projectContributor, Company = this.Company, Introduction = this.Company }); } }
public void AddContributor(ProjectContributor contributor) { if (!Contributors.Any(v => v.Id == contributor.Id)) { this.AddDomainEvent(new ProjectJoinedEvent { Contributor = contributor , Company = this.Company , Introduction = this.Introduction , Avatar = this.Avatar }); Contributors.Add(contributor); } }
public void AddContributor(ProjectContributor contributor) { if (ProjectContributors.Any(x => x.UserId == contributor.UserId)) { return; } ProjectContributors.Add(contributor); AddDomainEvent(new ProjectJoinedEvent { ProjectContributor = contributor, Company = Company, Introduction = Introduction, Avatar = Avator }); }
/// <summary> /// 添加项目贡献者 /// </summary> /// <param name="projectContributor"></param> public void AddContributor(ProjectContributor projectContributor) { //如果不在查看列表中,需添加 if (!Contributors.Any(b => b.UserId == projectContributor.UserId)) { Contributors.Add(projectContributor); //添加 参与项目事件 AddDomainEvent(new ProjectJoinEvent { Company = this.Company, Introduction = this.Introduction, Avatar = this.Avatar, ProjectContributor = projectContributor }); } }