Beispiel #1
0
 public ActionResult <TeamModelOut> GetTeamById(string teamId)
 {
     try
     {
         return(new TeamModelOut(teamServices.GetTeam(teamId)));
     }
     catch (ServicesException e)
     {
         return(BadRequest(e.Message));
     }
 }
Beispiel #2
0
        private void UpdateResultsIfNecessary(EncounterDTO servicesDTO, ITeamServices teamServices)
        {
            if (!Results.Any())
            {
                return;
            }
            Dictionary <TeamDTO, int> results = new Dictionary <TeamDTO, int>();

            foreach (TeamResult result in Results)
            {
                TeamDTO team = teamServices.GetTeam(result.TeamId);
                results.Add(team, result.Result);
            }

            servicesDTO.Results = results;
        }