Esempio n. 1
0
 public static void InsertAddress(PersonAddress address)
 {
     using (var context = new MyDBEntities())
     {
         context.PersonAddresses.Add(address);
         context.SaveChanges();
     }
 }
Esempio n. 2
0
 public static void InsertAppointment(Appointment appointment)
 {
     using (var context = new MyDBEntities())
     {
         context.Appointments.Add(appointment);
         context.SaveChanges();
     }
 }
Esempio n. 3
0
 public static void InsertGP(GP gp)
 {
     using (var context = new MyDBEntities())
     {
         context.GPs.Add(gp);
         context.SaveChanges();
     }
 }
Esempio n. 4
0
 public static void InsertMember(Person person)
 {
     using (var context = new MyDBEntities())
     {
         context.People.Add(person);
         context.SaveChanges();
     }
 }
Esempio n. 5
0
 public static void InsertGP(Person gp)
 {
     using (var context = new MyDBEntities())
     {
         gp.PersonMember = Member.GP;
         gp.PersonDOB    = new DateTime(2021, 01, 01);
         context.People.Add(gp);
         context.SaveChanges();
     }
 }