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")); } }
public IEnumerable <Player> Get() { return(_playerAppService.Get()); }