Esempio n. 1
0
        public void DoctorAddPatient(Patient newPatient, string name)
        {
            var doctor = _context.Doctors.Where(d => d.UserName == name).FirstOrDefault();

            _context.Add(newPatient);
            _context.DoctorPatients.Add(new DoctorPatient()
            {
                Id = doctor.Id, PatientId = newPatient.PatientId
            });
        }
Esempio n. 2
0
 public void AddDoctor(Doctor newDoctor)
 {
     _context.Add(newDoctor);
 }