public bool CreateAdmin(Admin admin)
 {
     try
     {
         _ctx.Admins.Add(admin);
         _ctx.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
 public bool CreateTechnician(Technician technician)
 {
     try
     {
         _ctx.Technicians.Add(technician);
         _ctx.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
 public bool CreateDoctor(Doctor doctor)
 {
     try
     {
         _ctx.Doctors.Add(doctor);
         _ctx.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
 public bool CreatePatient(Patient patient)
 {
     try
     {
         _ctx.Patients.Add(patient);
         _ctx.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Esempio n. 5
0
 public bool CreateClient(Client client)
 {
     try
     {
         _ctx.Clients.Add(client);
         _ctx.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Esempio n. 6
0
 public bool CreateAppointment(Appointment appointment)
 {
     try
     {
         _ctx.Appointments.Add(appointment);
         _ctx.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }