public async Task <IActionResult> OnGet()
        {
            if (SemId == Guid.Empty)
            {
                TempData["Warning"] = "No semester was chosen";
                return(RedirectToPage("/Admin/"));
            }

            var response = await _data.DeleteSemester(SemId);

            if (response == null)
            {
                TempData["Failed"] = "The chosen semester does not exist";
            }
            else
            {
                TempData["Success"] = "Semester deletion was successfully";
            }

            return(RedirectToPage("/Admin/AcademicYearDetails", new { Id = response.AcademicYearId }));
        }
        public async Task <IActionResult> OnPost()
        {
            if (!ModelState.IsValid)
            {
                TempData["Warning"] = "No semester was selected";
                return(Page());
            }

            var response = await _dataServices.DeleteSemester(ViewModel.SemId);

            if (response == null)
            {
                TempData["Failed"] = "";
            }
            else
            {
                TempData["Success"] = "The semester was successfully deleted";
            }

            await CallData();

            return(Page());
        }