private async Task <Patient> Get(IPatientIdentity patient)
        {
            if (patient == null)
            {
                throw new ArgumentNullException(nameof(patient));
            }

            return(await this.Context.Patient.FirstOrDefaultAsync(x => x.Id == patient.Id));
        }
Beispiel #2
0
        public async Task <MyWebApp.Domain.Byer> GetAsync(IPatientIdentity byer)
        {
            var result = await this.Get(byer);

            return(this.Mapper.Map <MyWebApp.Domain.Byer>(result));
        }
 public Task <Patient> GetAsync(IPatientIdentity id)
 {
     return(this.PatientDAL.GetAsync(id));
 }
Beispiel #4
0
        public void AddPatientToDoctor(IPatientIdentity identity, Doctor doctor, DateTime date)
        {
            var patient = hospitalDb.Hospital.Patients.First(p => p.PassportCode == identity.PassportCode);

            AddOrCreatePatientToDoctor(patient, doctor, date);
        }
        public async Task <MyWebApp.Domain.Patient> GetAsync(IPatientIdentity patient)
        {
            var result = await this.Get(patient);

            return(this.Mapper.Map <MyWebApp.Domain.Patient>(result));
        }