private void BtnSave_Click(object sender, RoutedEventArgs e) { try { db.SaveChanges(); } catch { MessageBox.Show("Ошибка"); db.Dispose(); } }
private void BtnSAve_Click(object sender, RoutedEventArgs e) { sp.sFIO = tbFIO.Text; sp.passport = tbpas.Text; sp.address = txAddress.Text; db.SaveChanges(); }