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 (ProjectContributors.Any(x => x.UserId == contributor.UserId)) { return; } ProjectContributors.Add(contributor); AddDomainEvent(new ProjectJoinedEvent { ProjectContributor = contributor, Company = Company, Introduction = Introduction, Avatar = Avator }); }