public async Task HandleAsync(ExamFinalizeCommand command) { var exam = _context.Exam.FirstOrDefault(x => x.Id == command.ExamId); exam.Finalized = true; await _context.SaveChangesAsync(); }
public async Task <IActionResult> FinalizeExam(ExamFinalizeCommand command, int courseId) { await _commandBus.ExecuteAsync(command); return(Ok()); }