public IActionResult GetAllLeagues() { var result = _leagueService.GetAllLeagues(); if (result.ErrorOccurred) { return(BadRequest(result)); } return(Ok(result)); }
public async Task <IActionResult> GetAll() { var view = await _leagueService.GetAllLeagues(); return(Ok(view)); }