public async Task <int> SaveAppointmentAsync(Appointment appointment) { try { return(await _sql.SaveData <Appointment, dynamic>("spAppointments_Insert", new { appointment.PatientId, appointment.AppointmentDate, appointment.AppointmentDuration })); } catch (SqlException) { throw; } }
public async Task <int> SavePatientAsync(Patient patient) { try { return(await _sql.SaveData <Patient, dynamic>("spPatients_Insert", new { patient.FirstName, patient.LastName, patient.Address, patient.PhoneNumber, patient.Email })); } catch (SqlException) { throw; } }
public async Task <int> SaveInterventionAsync(Intervention intervention) { try { var result = await _sql.SaveData <Intervention, dynamic>("spIntervention_Insert", new { intervention.AppointmentId, intervention.ToothId, intervention.Description }); return(result); } catch (SqlException) { throw; } }