Exemplo n.º 1
0
        public async Task HandleAsync(ExamEnableSolvingCommand command)
        {
            var exam = await _context.Exam.FirstOrDefaultAsync(x => x.Id == command.ExamId);

            exam.Enabled = true;
            await _context.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public async Task <IActionResult> EnableExamSolving(ExamEnableSolvingCommand command, int courseId)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }