Exemple #1
0
        private IReadOnlyDictionary <string, int> TryToGetPositionsTable(string sport)
        {
            IPositionTableGenerator generator  = assemblyLoader.GetImplementations <IPositionTableGenerator>().First();
            IEnumerable <Encounter> encounters = encounterRepo.GetBySport(sport);

            return(generator.GetPositionTable(encounters));
        }
Exemple #2
0
 public IEnumerable <EncounterDTO> GetEncountersBySport(string sportName)
 {
     try
     {
         return(encounterRepository.GetBySport(sportName).Select(e => encounterMapper.Map(e)));
     }
     catch (DataAccessException e)
     {
         throw new ServicesException($"Failure to recover encounter with {sportName} sport name.", e);
     }
 }