static void RunSampleB1() { var teamRockyId = new TeamId(1); var teamRocky = new SampleB1.Team(teamRockyId); var teamMemberTheHulkId = new TeamMemberId(2); var teamMemberTheHulk = new SampleB1.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1)); var teamRepository = new SampleB1.TeamRepository(new Dictionary<TeamId, SampleB1.Team> { { teamRockyId, teamRocky } }); var teamMemberRepository = new SampleB1.TeamMemberRepository(new Dictionary<TeamMemberId, SampleB1.TeamMember> { { teamMemberTheHulkId, teamMemberTheHulk } }); var service = new SampleB1.TeamApplicationService(teamRepository, teamMemberRepository); var request = new AppointChairmanRequest { TeamId = 1, TeamMemberId = 2 }; service.When(request); }
static void RunSampleB1() { var teamRockyId = new TeamId(1); var teamRocky = new SampleB1.Team(teamRockyId); var teamMemberTheHulkId = new TeamMemberId(2); var teamMemberTheHulk = new SampleB1.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1)); var teamRepository = new SampleB1.TeamRepository(new Dictionary <TeamId, SampleB1.Team> { { teamRockyId, teamRocky } }); var teamMemberRepository = new SampleB1.TeamMemberRepository(new Dictionary <TeamMemberId, SampleB1.TeamMember> { { teamMemberTheHulkId, teamMemberTheHulk } }); var service = new SampleB1.TeamApplicationService(teamRepository, teamMemberRepository); var request = new AppointChairmanRequest { TeamId = 1, TeamMemberId = 2 }; service.When(request); }