public async Task <IEnumerable <SportDTO> > GetAllSports() { var sports = await _sportRepository.GetAllSports(); return(_mapper.Map <IEnumerable <SportDTO> >(sports)); }
/* * Get list of all sports */ public List <Sport> GetAllSports() { return(_sportRepository.GetAllSports()); }
public IActionResult GetAllSports() { return(Ok(_sportRepository.GetAllSports())); }