Im planning to buy cooler master haf x cpu case is it compatible with G31M-ES2C?

Solution
It is certainly compatible, the Form factor of the board you have is Micro ATX, Cooler Maste HAF X supports Full ATX motherboards so yours is not a problem. Good luck !!