Beispiel #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            if (id > 0)
            {
                Player = await _playerAppService.Get(id);

                if (Player == null)
                {
                    ErrorMessage = $"玩家 {id} 不存在!";
                    return(Page());
                }
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Player/Index"));
            }
        }
Beispiel #2
0
 public IEnumerable <Player> Get()
 {
     return(_playerAppService.Get());
 }