Exemple #1
0
        // GET: Assessments/Create
        public async Task <IActionResult> Create()
        {
            try
            {
                ViewBag.ModuleList = await moduleRepository.AllAsync();

                ViewBag.AssessmentID = await GetAssessmentID();

                return(View());
            }
            catch (DataAccessException e)
            {
                ViewBag.ErrorMsg = ErrorProcessing.ProcessException("Data Access exception. ", e);
                return(RedirectToAction("Unknown", "Error"));
            }
            catch (Exception e)
            {
                ViewBag.ErrorMsg = ErrorProcessing.ProcessException("General exception. ", e);
                return(RedirectToAction("Unknown", "Error"));
            }
        }