コード例 #1
0
        public IActionResult TeamEventSpecificScore(int teamId, int eventId)
        {
            var score  = _transActionRepo.TeamEventSpecificScore(teamId, eventId);
            var result = new TeamSpecificScoreDto
            {
                eventId = eventId,
                teamId  = teamId,
                score   = score
            };

            return(Ok(result));
        }
コード例 #2
0
        public IActionResult TeamEventSpecificScore(int teamId, int eventId)
        {
            var eventEntity = _unitOfWork.Event.GetById(eventId);
            var users       = _unitOfWork.User.GetByTeamId(teamId);
            var score       = _unitOfWork.UserActivity.TeamEventSpecificScore(users, teamId, eventId);
            var result      = new TeamSpecificScoreDto
            {
                EventId   = eventId,
                TeamId    = teamId,
                Score     = score,
                EventName = eventEntity.Name
            };

            return(StatusCode(200, new TransActionResponse(result)));
        }