/// <summary>Gets all of the players from the source.</summary>
 /// <returns>All of the players from the source.</returns>
 [HttpGet] public PlayerCollection GetPlayers() =>
 new PlayerCollection
 {
     Players = _readerService.ReadCsvData(_configuration.GetValue <string>("CsvFiles:PlayerFile"))
 };
Esempio n. 2
0
 /// <summary>Gets all of the batters from the BHQ stats source.</summary>
 /// <returns>All of the batters from the BHQ stats source.</returns>
 [HttpGet("batters")] public async Task <IEnumerable <BhqBattingStats> > GetBatters() =>
 await _fileReaderService.ReadCsvData <BhqBattingStats>(new FileReader(_configuration.GetValue <string>("CsvFiles:BatterFile")));