public void Update(Patient model) { using (var db = new DbManager()) { var query = new SqlQuery<Patient>(); query.Update(model); } }
public void Insert(Patient model) { using (var db = new DbManager()) { var query = new SqlQuery<Patient>(); query.Insert(model); } }
public void InsertOrUpdate(Patient model) { var modelInDb = this.FindById(model.ID); if (modelInDb == null) this.Insert(model); else this.Update(model); }
public static bool AddPatient(Patient patient) { ServicePatientClient servicePatient = new ServicePatientClient(); try { return servicePatient.AddPatient(patient); } catch (Exception) { return false; } }
private void detach_Patients(Patient entity) { this.SendPropertyChanging(); entity.Contact = null; }
private void attach_Patients(Patient entity) { this.SendPropertyChanging(); entity.Contact = this; }
partial void DeletePatient(Patient instance);
partial void UpdatePatient(Patient instance);
partial void InsertPatient(Patient instance);