public ActionResult Edit(DoctorProfesion doctorProfesion)
 {
     try
     {
         if (ModelState.IsValid)
         {
             interfaceobj.UpdateModel(doctorProfesion);
             interfaceobj.Save();
             return(RedirectToAction("Index"));
         }
     }
     catch (DataException)
     {
         ModelState.AddModelError(string.Empty, "Unable to save changes.Try again, and if the problem persists contact your system administrator.");
     }
     return(View(doctorProfesion));
 }
        public ActionResult Create(DoctorProfesion doctorProfesion)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    interfaceobj.InsertModel(doctorProfesion);
                    interfaceobj.Save();
                    return(RedirectToAction("Index"));
                }
            }
            catch (DataException)
            {
                ModelState.AddModelError("", "Unable to save changes. Try Againand if the problem persists see your system administrator.");
            }

            return(View(doctorProfesion));
        }
        // GET: /DoctorProfession/Delete/5
        public ActionResult Delete(int id)
        {
            DoctorProfesion docProf = interfaceobj.GetModelByID(id);

            return(View(docProf));
        }
        //GET:/DoctorProfession/Edit/5
        public ActionResult Edit(int id)
        {
            DoctorProfesion docProfession = interfaceobj.GetModelByID(id);

            return(View(docProfession));
        }
        // Details/Id
        public ActionResult Details(int id)
        {
            DoctorProfesion profesion = interfaceobj.GetModelByID(id);

            return(View(profesion));
        }