Inheritance: ITeamMemberRepository
コード例 #1
0
ファイル: Program.cs プロジェクト: ddd-cqrs-es/NoBodyToBuild
        static void RunSampleE()
        {
            var teamRockyId         = new TeamId(1);
            var teamRocky           = new SampleE.Team(teamRockyId);
            var teamMemberTheHulkId = new TeamMemberId(2);
            var teamMemberTheHulk   = new SampleE.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
            var teamRepository      = new SampleE.TeamRepository(new Dictionary <TeamId, SampleE.Team> {
                { teamRockyId, teamRocky }
            });
            var teamMemberRepository = new SampleE.TeamMemberRepository(new Dictionary <TeamMemberId, SampleE.TeamMember> {
                { teamMemberTheHulkId, teamMemberTheHulk }
            });
            var makeChairmanService = new SampleE.AppointChairmanService(teamRepository, teamMemberRepository);
            var service             = new SampleE.TeamApplicationService(makeChairmanService);
            var request             = new AppointChairmanRequest {
                TeamId = 1, TeamMemberId = 2
            };

            service.When(request);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: yreynhout/NoBodyToBuild
 static void RunSampleE()
 {
     var teamRockyId = new TeamId(1);
       var teamRocky = new SampleE.Team(teamRockyId);
       var teamMemberTheHulkId = new TeamMemberId(2);
       var teamMemberTheHulk = new SampleE.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
       var teamRepository = new SampleE.TeamRepository(new Dictionary<TeamId, SampleE.Team> { { teamRockyId, teamRocky } });
       var teamMemberRepository = new SampleE.TeamMemberRepository(new Dictionary<TeamMemberId, SampleE.TeamMember> { { teamMemberTheHulkId, teamMemberTheHulk } });
       var makeChairmanService = new SampleE.AppointChairmanService(teamRepository, teamMemberRepository);
       var service = new SampleE.TeamApplicationService(makeChairmanService);
       var request = new AppointChairmanRequest { TeamId = 1, TeamMemberId = 2 };
       service.When(request);
 }