コード例 #1
0
        public IActionResult Index()
        {
            var model = new TrainingIndexModel();

            model.Trainings = _trainingService.GetAllTrainingsForDepartment(DepartmentId);

            return(View(model));
        }
コード例 #2
0
        public async Task <IActionResult> Index()
        {
            var model = new TrainingIndexModel();

            model.Trainings = await _trainingService.GetAllTrainingsForDepartmentAsync(DepartmentId);

            return(View(model));
        }