コード例 #1
0
        public ActionResult ChangeDisplayName(ChangeDisplayNameModelDto model)
        {
            if (this.ModelState.IsValid)
            {
                this.accountService.ChangeDisplayName(model);
                return this.RedirectToAction("Index");
            }

            var viewmodel = this.accountService.GetAccountDetailsViewModel();
            return this.View("ChangeDisplayName", viewmodel);
        }
コード例 #2
0
 public void ChangeDisplayName(ChangeDisplayNameModelDto model)
 {
     var currentUserId = this.authentication.GetCurrentUserId();
     this.userRepository.ChangeDisplayName(currentUserId, model.Displayname);
 }