When you hire a criminal defense attorney, you expect them to defend you to the latter. That means the criminal defense attorney should work to the best of their ability to ensure they get your case dismissed. But that is not something that might come easy.
You have to ensure you hire a criminal defense lawyer that is up to the required standard. That means you have to assess their experience and reputation. The lawyer needs to have a track record of successfully representing and defending their clients in a criminal case. Most importantly, you have to know the attorney fees you have to pay.
The criminal defense lawyer needs to understand your rights and defend them. So, in case you were harassed during the point of arrest, the criminal defense lawyer should be able to ensure you get justice in that regard. There is also the issue of evidence. Remember, the prosecutor needs to prove that you committed the criminal offense beyond a reasonable doubt. If that is not possible, then your case will be dismissed. That is why you need to ensure you have an attorney who can analyze your case in-depth to ensure that any evidence that does not add up is challenged accordingly. The lawyer should not let you face harassment and discrimination during the trial.