This question already has an answer here:
I will be travelling to France and Switzerland with Family. Stay in both France and Switzerland is 5 days. As I am travelling through Lufthansa my port of entry and exit is Germany but I am not staying in Germany other than transit. In this case, should I be applying for Visa through germany?