Beispiel #1
0
 public async Task <IEnumerable <PlayerViewModel> > Get()
 {
     return(await _playerAppService.GetAll());
 }
Beispiel #2
0
 public IActionResult GetAll()
 {
     try
     {
         var response = _mapper.Map <IList <Player>, IList <PlayerViewModel> >(_playerAppService.GetAll());
         return(Ok(response));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Beispiel #3
0
 public async Task RenderPlayers()
 {
     await Clients.All.SendAsync("Render", _playerAppService.GetAll(), _fruitAppService.GetAll());
 }
Beispiel #4
0
 public void AddFruit()
 {
     _fruitAppService.Add();
     _hubContext.Clients.All.SendAsync("Render", _playerAppService.GetAll(), _fruitAppService.GetAll());
 }
Beispiel #5
0
 public IEnumerable <Player> GetPlayers()
 {
     return(_service.GetAll());
 }