private void AddPerson(addPersonToEFWindow obj)
        {
            try
            {
                using (var context = new DC_DatabaseEntities())
                {
                    context.PersonTables.Add(new PersonTable {
                        Name = this.name
                    });
                    context.SaveChanges();
                }


                _efViewModel.EF_Data.Add(new PersonModel {
                    name = this.name
                });
                obj.Hide();
            }

            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
Ejemplo n.º 2
0
 private void addNewPersonMethod(EFViewModel obj)
 {
     var window = new addPersonToEFWindow();
     window.Visibility = System.Windows.Visibility.Visible;            
 }