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(ProjectContributors contributors) { if (Contributors.All(v => v.UserId != UserId)) { Contributors.Add(contributors); AddDomainEvent(new ProjectJoinedEvent() { Contributors = contributors }); } }
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 }); }