Why is sodium chloride different from sodium chloride crystals in its electricity conductivity?

Solid sodium chloride is not an electrolyte.
Sodium chloride in water solutions or molten sodium chloride are electrolytes.