Beispiel #1
0
        public async Task <List <PlayersDTO> > GetAll()
        {
            var objPlayers = await _playersService.GetAll();

            var players = _playersMapper.MapperListPlayers(objPlayers);

            return(players);
        }
Beispiel #2
0
        public async Task <IActionResult> Players()
        {
            var dtos = await _playersService.GetAll();

            var models = _mapper.Map <IReadOnlyCollection <PlayerDto>, IReadOnlyCollection <PlayerViewModel> >(dtos);

            return(View(models));
        }
Beispiel #3
0
 public IEnumerable <Player> Get()
 {
     return(_getPlayersService.GetAll());
 }
Beispiel #4
0
        public IActionResult GetAll()
        {
            var result = _playersService.GetAll();

            return(Ok(result));
        }