public IActionResult Create() { if (!_groupBll.GroupTeamLink()) { return(BadRequest()); } return(new CreatedResult("", _groupBll.GetGroupLastFase())); }
public IActionResult Create() { var fase = _bllGroup.GetLastFase(); var groups = _bllGroup.GetGroupLastFase(); var matchs = _bllMatch.StarMatch(groups.ToList()); var overMatchs = _bllMatch.OverMatch(matchs); var matchFull = _bllMatch.SaveMatch(overMatchs); var teamWiner = matchFull.Select(x => x.RsultTeamChampion).ToList(); //valida exception var result = _bllGroup.GroupTeamLink(fase + 1, teamWiner); if (matchFull == null) { return(BadRequest()); } return(new CreatedResult("Team create", matchFull)); }