Duryodhana went and asked for help from Lord Krishna for his war against Pandavas. Pandavas also went and asked Lord Krishna for help. God behaves as if he is helping both the parties. But we know finally what happened. Lord Krishna has seen that Dharma will win over Adharma. So anybody can pray God but what will be the final outcome is important.