Exemplo n.º 1
0
        public async Task <IEnumerable <Appointment> > GetAppointmentsByDateAsync(DateTime date)
        {
            try
            {
                var result = await _sql.LoadData <Appointment, dynamic>("spAppointments_GetByDate", new { AppointmentDate = date.Date });

                return(result);
            }
            catch (SqlException)
            {
                throw;
            }
        }
        public async Task <Patient> GetPatientByIdAsync(int id)
        {
            try
            {
                var patient = await _sql.LoadData <Patient, dynamic>("spPatients_GetById", new { Id = id });

                return(patient.FirstOrDefault());
            }
            catch (SqlException)
            {
                throw;
            }
        }
Exemplo n.º 3
0
        public async Task <Intervention> GetInterventionById(int id)
        {
            try
            {
                var result = await _sql.LoadData <Intervention, dynamic>("spIntervention_GetById", new { Id = id });

                return(result.FirstOrDefault());
            }
            catch (SqlException)
            {
                throw;
            }
        }
        public async Task <Tooth> GetToothByIdAsync(int id)
        {
            var output = await _sql.LoadData <Tooth, dynamic>("spTooth_GetById", new { Id = id });

            return(output.FirstOrDefault());
        }