Пример #1
0
 public void AddPerson(Person person)
 {
     using (var context = new DPADataContext())
     {
         context.Persons.InsertOnSubmit(person);
         context.SubmitChanges();
     }
 }
Пример #2
0
 public void AddDepartment(Department department)
 {
     using (var context = new DPADataContext())
     {
         context.Departments.InsertOnSubmit(department);
         context.SubmitChanges();
     }
 }