public void ChangeDiagnosis(Diagnosis diagnosis) { try { _context.Entry(diagnosis).State = EntityState.Modified; _context.SaveChanges(); } catch (Exception e) { _loggerService.Error($"{e}"); throw; } }
public void Update(Patient patient) { try { _context.Entry(patient).State = EntityState.Modified; _context.SaveChanges(); } catch (Exception e) { _loggerService.Error($"{e}"); throw; } }
public void ChangePrescriptionStatus(int?id) { var prescription = _context.Prescriptions.SingleOrDefault(p => p.PrescriptionType.Id == id); try { if (prescription == null) { return; } prescription.IsDone = !prescription.IsDone; _context.Entry(prescription).State = EntityState.Modified; _context.SaveChanges(); } catch (Exception e) { _loggerService.Error($"{e}"); throw; } }
public void Update(Doctor doctor) { _context.Entry(doctor).State = EntityState.Modified; _context.SaveChanges(); }