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

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