Exemplo n.º 1
0
        public async Task<Patient> UpdateAsync(Patient patient)
        {
            using (var uow = _uowFac.Create())
            {
                uow.PatientRepository.Update(patient);
                await uow.SaveChangesAsync();

                return patient;
            }
        }
Exemplo n.º 2
0
 public async Task<Patient> AddPatientAsync(Guid childId, Guid pediaId)
 {
     using (var uow = _uowFac.Create())
     {
         var patient = new Patient() { ChildId = childId, PediaId = pediaId };
         uow.PatientRepository.Insert(patient);
         await uow.SaveChangesAsync();
         //var list = await uow.PatientRepository.Items.Include(p => p.Pedia).ToListAsync();
         return patient;
     }
 }
Exemplo n.º 3
0
        public async Task<Patient> InsertAsync(Patient patient)
        {
            using (var uow = _uowFac.Create())
            {
                patient.Id = new Guid();

                uow.PatientRepository.Insert(patient);
                await uow.SaveChangesAsync();

                return patient;
            }
        }