public async Task <IActionResult> Delete(int?id)
        {
            if (id is null)
            {
                return(NotFound());
            }

            var app = await _appointmentRepository.GetAppointmentByIdAsync(id.Value);

            if (app is null)
            {
                return(NotFound());
            }

            var appointment = await AppointmentConverter.AppointmentForFrontEnd(app, _patientRepository);

            return(View(appointment));
        }
        // GET: Appointment/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var app = await _appointmentRepository.GetAppointmentByIdAsync(id.Value);//await _dbDataAccess.GetAppointmentByIdAsync(id.Value);

            if (app == null)
            {
                return(NotFound());
            }

            ViewBag.ListOfPatients = PatientConverter.ListForFrontEnd(await _patientRepository.GetAllPatientsAsync());
            ViewBag.ListOfHours    = hours.Hours;
            ViewBag.ListOfMinutes  = hours.Minutes;

            var appointment = await AppointmentConverter.AppointmentForFrontEnd(app, _patientRepository);

            return(View(appointment));
        }