public async Task <Unit> Handle(Eject request, CancellationToken cancellationToken) { var resultados = await _instructorRepository.Delete(request.Id); if (resultados > 0) { return(Unit.Value); } throw new Exception("Not Data Instructor Delete"); }
public async Task <Unit> Handle(Execute request, CancellationToken cancellationToken) { var results = await _instructorRepository.Delete(request.Id); if (results > 0) { return(Unit.Value); } throw new Exception("Something wrong, dont delete instructor"); }