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

            await db.Patients.AddAsync(patient);

            await db.SaveChangesAsync();

            return(patient);
        }
コード例 #2
0
        public async Task CreatePatientDoctor(PatientDoctor patientDoctor)
        {
            patientDoctor.CreationDate = DateTime.Now;

            await db.PatientDoctors.AddAsync(patientDoctor);

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

            await db.Doctors.AddAsync(doctor);

            await db.SaveChangesAsync();

            return(doctor);
        }