public ActionResult Create([Bind(Include = "DoctorId,Name,Special,LicenseExpirationDate")] DoctorViewModel dvm)
 {
     if (ModelState.IsValid)
     {
         IBL bl = new BLImplement();
         try
         {
             if (!bl.getAllSpecialties().ToList().Exists(a => a.SpecialtyName == dvm.SpecialName))
             {
                 bl.addSpecialty(new Specialty {
                     SpecialtyName = dvm.SpecialName
                 });
             }
         }
         catch (Exception ex)
         {
             ViewBag.Message = String.Format(ex.Message);
             return(RedirectToAction("Create"));
         }
         if (!bl.getAllSpecialties().ToList().Exists(a => a.SpecialtyName == dvm.SpecialName))
         {
             bl.addSpecialty(new Specialty {
                 SpecialtyName = dvm.SpecialName
             });
         }
         Doctor doctor = new Doctor()
         {
             Name = dvm.Name,
             LicenseExpirationDate = Convert.ToDateTime(dvm.LicenseExpirationDate),
             Special = bl.getAllSpecialties().Where(s => s.SpecialtyName == dvm.SpecialName).FirstOrDefault().Id
         };
         try
         {
             bl.addDoctor(doctor);
             ViewBag.Message = String.Format("The doctor {0} is successfully added", doctor.Name);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             ViewBag.Message = String.Format(ex.Message);
             return(RedirectToAction("Index"));
         }
     }
     return(View(dvm));
 }