Exemplo n.º 1
0
        /// <summary>
        /// 获取用户实例以及积分。
        /// </summary>
        /// <param name="id">用户Id。</param>
        /// <returns>返回当前视图。</returns>
        public async Task <IActionResult> OnGetAsync(int id)
        {
            CurrentUser = await _userManager.FindByIdAsync(id);

            if (CurrentUser == null)
            {
                return(NotFound());
            }
            CurrentScore = await _scoreManager.GetScoreAsync(id);

            ScoreSettings = await GetSettingsAsync <ScoreSettings>();

            Input = new InputModel {
                UserId = id, Score = 1000
            };
            return(Page());
        }