コード例 #1
0
ファイル: GroupService.cs プロジェクト: razorblade446/FifaPSL
        public Group[] getGroups()
        {
            group[] myGroups = _groupRepository.getGroups();

            Group[] response = new Group[myGroups.Length];

            for (int i = 0; i < myGroups.Length; i++) {
                response[i] = new Group();
                response[i].id = myGroups[i].group_id;
                response[i].name = myGroups[i].name;
                response[i].tournament_id = myGroups[i].tournament_id;
            }

            return response;
        }
コード例 #2
0
ファイル: GroupService.cs プロジェクト: razorblade446/FifaPSL
        public Group getGroup(int groupId)
        {
            @group myGroup = _groupRepository.getGroup(groupId);

            if (myGroup == null)
            {
                return null;
            }

            Group response = new Group();
            response.tournament_id = myGroup.tournament_id;
            response.name = myGroup.name;
            response.id = myGroup.group_id;

            return response;
        }
コード例 #3
0
        public Group[] getTournamentGroups(int tournamentId)
        {
            int[] groupIds = _groupRepository.getGroupIdsByTournamentId(tournamentId);

            Group[] groups = new Group[groupIds.Length];

            GroupService groupService = ServiceFactory.container.Resolve<GroupService>();

            for (int i = 0; i < groupIds.Length; i++)
            {
                groups[i] = groupService.getGroup(groupIds[i]);
            }

            return groups;
        }