public void Create(Guid id, User projectOwner) { var payload = new { ProjectOwnerId = projectOwner.Id }; var jsonPayload = JsonConvert.SerializeObject(payload); var teamCreatedEvent = new TeamCreatedEvent( id, 1, jsonPayload); Apply(teamCreatedEvent); }
private void Apply(TeamCreatedEvent teamCreatedEvent) { Name = teamCreatedEvent.Name; OrganizationKey = teamCreatedEvent.OrganizationKey; }