private void SaveUser_Click(object sender, RoutedEventArgs e) { user SelectedUser = (user)userComboBox.SelectedItem; role.users.Add(SelectedUser); context.SaveChanges(); MessageBox.Show("User was added"); this.Close(); }
private void SaveUser_Click(object sender, RoutedEventArgs e) { role SelectedRole = (role)roleComboBox.SelectedItem; user.roles.Add(SelectedRole); context.SaveChanges(); MessageBox.Show("Role was added"); this.Close(); }