public IActionResult GetById(Guid id) { try { var response = _mapper.Map <Player, PlayerViewModel>(_playerAppService.GetById(id)); return(Ok(response)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
// GET: Heroes/Details/5 public ActionResult Details(string id) { return(View(_playerAppService.GetById(ObjectId.Parse(id)))); }
public async Task <PlayerViewModel> Get(int id) { return(await _playerAppService.GetById(id)); }
public Player GetById(string id) { return(_playerAppService.GetById(id)); }
// GET: api/Players/5 public PlayerViewModel Get(string id) { return(_playerAppService.GetById(ObjectId.Parse(id))); }