public IActionResult InsertPatientNote(PatientNoteModel note) { if (note != null && ModelState.IsValid) { note.CreationDate = DateTime.Now; if (_validatorRepository.Validate(note)) { _patientNoteRepository.Insert(note); _patientNoteRepository.Save(); return(RedirectToAction("ViewPatientNotes", "PatientNote", new { patientId = note.PatientId })); } } return(BadRequest(ModelState)); }
public void DeleteById(Guid id) { patientNoteRepository.DeleteById(id); patientNoteRepository.Save(); }