Пример #1
0
 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))));
 }
Пример #3
0
 public async Task <PlayerViewModel> Get(int id)
 {
     return(await _playerAppService.GetById(id));
 }
Пример #4
0
 public Player GetById(string id)
 {
     return(_playerAppService.GetById(id));
 }
Пример #5
0
 // GET: api/Players/5
 public PlayerViewModel Get(string id)
 {
     return(_playerAppService.GetById(ObjectId.Parse(id)));
 }