public async Task <Unit> Handle(Execute request, CancellationToken cancellationToken) { var result = await _instructorRepository.Update(request.InstructorId, request.FirstName, request.LastName, request.Grade); if (result > 0) { return(Unit.Value); } throw new Exception("Something wrong, dont update instructor"); }
public async Task <Unit> Handle(Eject request, CancellationToken cancellationToken) { var result = await _instructorRepository.Update(request.InstructorId, request.Name, request.LastName, request.Grade); if (result > 0) { return(Unit.Value); } throw new Exception("Not Insert Data Instructor"); }