public async Task PostFranchiseTagAmounts() { var salariesTask = _mfl.GetSalaries(); var positionTask = _mfl.GetAllMflPlayers(); await Task.WhenAll(salariesTask, positionTask); var positionIds = positionTask.Result.players.player.Where(p => p.position == "WR" || p.position == "QB" || p.position == "RB" || p.position == "TE").ToList(); var playerSalaries = salariesTask.Result.Salaries.LeagueUnit.Player.Select(_ => new { Salary = Decimal.TryParse(_.Salary, out var sal) ? sal : 0, Id = _.Id }).ToList();
public async Task <List <Player> > GetAllRelevantPlayers() { return((await _mfl.GetAllMflPlayers()).players.player .Where(p => p.position == "WR" || p.position == "QB" || p.position == "TE" || p.position == "RB").ToList()); }