示例#1
0
 public void AddContributor(ProjectContributor contributor)
 {
     if (ProjectContributors.Any(x => x.UserId == contributor.UserId))
     {
         return;
     }
     ProjectContributors.Add(contributor);
     AddDomainEvent(new ProjectJoinedEvent()
     {
         ProjectContributor = contributor
     });
 }
示例#2
0
        public void AddContributor(ProjectContributors contributors)
        {
            if (Contributors.All(v => v.UserId != UserId))
            {
                Contributors.Add(contributors);

                AddDomainEvent(new ProjectJoinedEvent()
                {
                    Contributors = contributors
                });
            }
        }
示例#3
0
 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
     });
 }