Пример #1
0
        /// <summary> Updates one existing specialty in the database
        /// <param name="specialty"> Inner_Specialty Object - represents the fields of a Specialty in the database </param>
        /// <returns> no return </returns>
        /// </summary>
        public async Task UpdateSpecialtyAsync(Inner_Specialty specialty)
        {
            Data_Specialty currentEntity = await _context.Specialties.FindAsync(specialty.SpecialtyId);

            Data_Specialty newEntity = Mapper.UnMapSpecialty(specialty);

            _context.Entry(currentEntity).CurrentValues.SetValues(newEntity);
            await Save();
        }
        /// <summary> Updates one existing insurance in the database
        /// <param name="insurance"> Inner_Insurance Object - represents the fields of a Insurance in the database </param>
        /// <returns> no return </returns>
        /// </summary>
        public async Task UpdateInsuranceAsync(Inner_Insurance insurance)
        {
            Data_Insurance currentEntity = await _context.Insurances.FindAsync(insurance.InsuranceId);

            Data_Insurance newEntity = Mapper.UnMapInsurance(insurance);

            _context.Entry(currentEntity).CurrentValues.SetValues(newEntity);
            await Save();
        }
        /// <summary> Updates one existing provider in the database
        /// <param name="provider"> Inner_Provider Object - represents the fields of a Provider in the database </param>
        /// <returns> no return </returns>
        /// </summary>
        public async Task UpdateProviderAsync(Inner_Provider provider)
        {
            Data_Provider currentEntity = await _context.Providers.FindAsync(provider.ProviderId);

            Data_Provider newEntity = Mapper.UnMapProvider(provider);

            _context.Entry(currentEntity).CurrentValues.SetValues(newEntity);
            await Save();
        }
        /// <summary> Updates one existing appointment in the database
        /// <param name="appointment"> Inner_Appointment Object - represents the fields of a Appointment in the database </param>
        /// <returns> no return </returns>
        /// </summary>
        public async Task UpdateAppointmentAsync(Inner_Appointment appointment)
        {
            Data_Appointment currentEntity = await _context.Appointments.FindAsync(appointment.AppointmentId);

            Data_Appointment newEntity = Mapper.UnMapAppointment(appointment);

            _context.Entry(currentEntity).CurrentValues.SetValues(newEntity);
            await Save();
        }
Пример #5
0
        /// <summary> Updates one existing facility in the database
        /// <param name="facility"> Inner_Facility Object - represents the fields of a Facility in the database </param>
        /// <returns> no return </returns>
        /// </summary>
        public async Task UpdateFacilityAsync(Inner_Facility facility)
        {
            Data_Facility currentEntity = await _context.Facilities.FindAsync(facility.FacilityId);

            Data_Facility newEntity = Mapper.UnMapFacility(facility);

            _context.Entry(currentEntity).CurrentValues.SetValues(newEntity);
            await Save();
        }
Пример #6
0
        /// <summary> Updates one existing patient in the database
        /// <param name="patient"> Inner_Patient Object - represents the fields of a Patient in the database </param>
        /// <returns> no return </returns>
        /// </summary>
        public async Task UpdatePatientAsync(Inner_Patient patient)
        {
            Data_Patient currentEntity = await _context.Patients.FindAsync(patient.PatientId);

            Data_Patient newEntity = Mapper.UnMapPatient(patient);

            _context.Entry(currentEntity).CurrentValues.SetValues(newEntity);
            await Save();
        }