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 (Contributors.All(v => v.Id != contributor.Id)) { this.AddDomainEvent(new ProjectJoinedEvent { Contributor = contributor , Company = this.Company , Introduction = this.Introduction , Avatar = this.Avatar }); Contributors.Add(contributor); } }