示例#1
0
        public async Task HandleAsync(ExamFinalizeCommand command)
        {
            var exam = _context.Exam.FirstOrDefault(x => x.Id == command.ExamId);

            exam.Finalized = true;
            await _context.SaveChangesAsync();
        }
示例#2
0
        public async Task <IActionResult> FinalizeExam(ExamFinalizeCommand command, int courseId)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }