protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
private void UpdateStatus(PCPCommunication comm, string status) { PatientLogModel db = new PatientLogModel(); comm.CommStatus = status; db.Entry(comm).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); db.Dispose(); }
private void UpdateCommTable(PCPCommunication comm) { comm.ScheduledTime = DateTime.Now; PatientLogModel db = new PatientLogModel(); db.PCPCommunications.Add(comm); db.SaveChanges(); db.Dispose(); }