private async void updateBtn_Click(object sender, RoutedEventArgs e) { if (usernameTextBox.Text == null || emailTextBox.Text == null) { MessageBox.Show("Username and Email are required."); } else { UserDto user = new UserDto() { Username = usernameTextBox.Text, Email = emailTextBox.Text, FName = firstNameTextBox.Text, LName = lastNameTextBox.Text, PhoneNumber = phoneNumberTextBox.Text, }; await userManager.Edit(user); } }