public async Task <IActionResult> GetList()
        {
            try
            {
                var queryResult = await _mediator.Send(new GetCourseListQuery());

                var model = new GetCourseListResponse
                {
                    Courses = queryResult.Courses.Select(c => (GetCourseListItem)c).ToList()
                };

                return(Ok(model));
            }
            catch (Exception e)
            {
                _logger.LogError(e, "Error attempting to get list of training courses");
                return(BadRequest());
            }
        }
        public async Task <IActionResult> GetActiveList()
        {
            try
            {
                var queryResult = await _mediator.Send(new GetActiveTrainingCoursesQuery());

                var model = new GetCourseListResponse
                {
                    Courses = queryResult.TrainingCourses.Select(c => (GetCourseListItem)c).ToList()
                };

                return(Ok(model));
            }
            catch (Exception e)
            {
                _logger.LogError(e, "Error attempting to get list of training courses");
                return(StatusCode((int)HttpStatusCode.InternalServerError));
            }
        }