public bool softDeleteDoctor(doctor doc) { if (doc != null) { doc.docActive = false; saveChanges(); return true; } else { return false; } }
public bool deleteDoctor(doctor doc) { bool result = true; try { Context.doctors.DeleteObject(doc); saveChanges(); } catch (Exception) { result = false; } return result; }
/// <summary> /// Deprecated Method for adding a new object to the doctors EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTodoctors(doctor doctor) { base.AddObject("doctors", doctor); }
/// <summary> /// Create a new doctor object. /// </summary> /// <param name="docID">Initial value of the docID property.</param> /// <param name="docFirstName">Initial value of the docFirstName property.</param> /// <param name="docDateCreated">Initial value of the docDateCreated property.</param> public static doctor Createdoctor(global::System.Int32 docID, global::System.String docFirstName, global::System.DateTime docDateCreated) { doctor doctor = new doctor(); doctor.docID = docID; doctor.docFirstName = docFirstName; doctor.docDateCreated = docDateCreated; return doctor; }
public void saveNewDoctor(doctor doc) { Context.AddTodoctors(doc); Context.SaveChanges(); }
public void insertNewDoctor(doctor doc) { Context.AddTodoctors(doc); saveChanges(); }