public async Task Update(long accountId, UpdateAccountRequestViewModel updateAccountRequestViewModel) { Account account = await _userManager.FindByIdAsync(accountId.ToString()); _mapper.Map(updateAccountRequestViewModel, account); IdentityResult result = await _userManager.UpdateAsync(account); if (!result.Succeeded) { throw new IdentityException(result.Errors.GetErrors()); } }
public async Task <ActionResult> Update([FromBody] UpdateAccountRequestViewModel updateAccountRequestViewModel) { await _accountsService.Update(_account.Id, updateAccountRequestViewModel); return(Ok()); }