Exemple #1
0
        public async Task <IActionResult> AddDoctorAbsence(AddDoctorAbsenceViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            await _appService.AddDoctorsAbsence(User.Identity.Name, model.AbsenceDate, model.AbsenceDescription,
                                                CancellationToken.None);

            return(RedirectToAction("Index", "Home"));
        }