public PatientsViewModel InsertPatients(PatientsEditViewModel _patient) { PatientsEntity new_patient = new PatientsEntity(); new_patient.Person.Name = _patient.Name; new_patient.Person.Surname = _patient.Surname; new_patient.Person.Address = _patient.Address; new_patient.Person.Phone = _patient.Phone; new_patient.IdDoctor = _patient.IdDoctor; new PatientsRepository().Insert(new_patient); return(this.ReadOnePatient(0)); }
public IActionResult Edit(PatientsEditViewModel patient) { _patientsManager.UpdatePatients(patient.Id, patient); return(RedirectToAction("Index")); }
public IActionResult Create(PatientsEditViewModel patient) { _patientsManager.InsertPatients(patient); return(RedirectToAction("Index")); }