Beispiel #1
0
 public void AddDoctor(Doctor doctor)
 {
     if (!Validation.IsId(doctor.Id))
     {
         throw new Exception("This ID isn't valid");
     }
     if (!Validation.ValidIdDB(doctor.Id))
     {
         throw new Exception("This ID already exists");
     }
     if (!Validation.IsEmail(doctor.Mail))
     {
         throw new Exception("This email isn't valid");
     }
     dal.AddDoctor(doctor);
 }