Diamond DA42 - Do you need the electric master on to extend landing gear?
In general you should always follow the emergency procedures described in your POH.
The emergency procedure for an Electrical Fire in Flight does not ask to extend the landing gear:


EMERGENCY SWITCH . . . . . . . . . . . . . . . . ON, if installed
AVIONIC MASTER . . . . . . . . . . . . . . . . . . . . OFF
ELECT. MASTER . . . . . . . . . . . . . . . . . . . . . OFF
Cabin heat &amp; defrost . . . . . . . . . . . . . . . . . . . OFF
Emergency windows . . . . . . . . . . . . . . . . . . . open if required
Land at the next suitable airfield

CAUTION
Switching OFF the ELECTRIC MASTER will lead to total
failure of all electronic and electric equipment. [...]

(DA-42 POH - Emergency Procedures)
In case of a complete electrical failure, the electrical hydraulic pump will no longer function:

In case of a failure of the electrical pump, which is driving the
landing gear actuators, the landing gear can be extended
manually [...]

Even if there is still pressure left in the system, the gear lever will no longer open the valves without electrical power:

The hydraulic pressure for the landing gear operation is provided by an electrically powered
hydraulic pump, which is activated by a pressure switch, when the required pressure is
too low. Electrically actuated hydraulic valves, which are operated with the gear selector
switch, provide the required hydraulic pressure for the movement of the landing gear.

(DA-42 POH - 7.5 Landing Gear)
The checklist for Complete Failure of the Electrical System says:

NOTE
The landing gear uplock is no longer ensured. The landing
gear may slowly extend.
The landing gear can be extended manually according to
3.6.2 - MANUAL EXTENSION OF THE LANDING GEAR.

So it's possible that the gear will already extend without electrical power, but you can always follow the manual extension procedure.