Exemple #1
0
        public async Task <Patient> CreatePatient(Patient patient)
        {
            patient.CreationDate = DateTime.Now;

            await db.Patients.AddAsync(patient);

            await db.SaveChangesAsync();

            return(patient);
        }
        public async Task CreatePatientDoctor(PatientDoctor patientDoctor)
        {
            patientDoctor.CreationDate = DateTime.Now;

            await db.PatientDoctors.AddAsync(patientDoctor);

            await db.SaveChangesAsync();
        }
Exemple #3
0
        public async Task <Doctor> CreateDoctor(Doctor doctor)
        {
            doctor.CreationDate = DateTime.Now;

            await db.Doctors.AddAsync(doctor);

            await db.SaveChangesAsync();

            return(doctor);
        }