public async Task <ActionResult> UpdateUser(MemberupdateDTO updateDto) { var username = User.FindFirst(ClaimTypes.NameIdentifier)?.Value; var user = await _userRepositary.GetUserByNameAsync(username); _mapper.Map(updateDto, user); _userRepositary.Update(user); if (await _userRepositary.SaveAllAsync()) { return(NoContent()); } return(BadRequest("Failed to update the user")); }